Re: [PHP] Differences

2012-10-04 Thread Marco Behnke
Am 04.10.12 02:48, schrieb David McGlone: > Hi everyone, I have been playing around with some code the list helped me > with > a while back and I'm not grasping the concept between return and echo and the > PHP manual doesn't answer this, unless I'm missing something. There is an > example at t

Re: [PHP] Differences

2012-10-03 Thread Rosalind Wills
On 10/3/12 9:57 PM, David McGlone wrote: Absolutely. I also think I learned that return can also work like echo if the code is written correctly. Echo and return are two completely different things in PHP. Echo is used for printing a value out in a document -- for instance, as follows, in the

Re: [PHP] Differences

2012-10-03 Thread tamouse mailing lists
On Wed, Oct 3, 2012 at 10:03 PM, tamouse mailing lists wrote: > On Wed, Oct 3, 2012 at 9:57 PM, David McGlone wrote: >> Absolutely. I also think I learned that return can also work like echo if the >> code is written correctly. > > > No, no, no. Return does NOT do the same thing as echo, nor vice

Re: [PHP] Differences

2012-10-03 Thread tamouse mailing lists
On Wed, Oct 3, 2012 at 9:57 PM, David McGlone wrote: > Absolutely. I also think I learned that return can also work like echo if the > code is written correctly. No, no, no. Return does NOT do the same thing as echo, nor vice versa. If you do try to make things work this way you are doing things

Re: [PHP] Differences

2012-10-03 Thread tamouse mailing lists
On Wed, Oct 3, 2012 at 9:01 PM, James wrote: > All of the images are displaying because you're simply instructing the > function to print out each file found with your call to glob(). The glob() > function returns an indexed array containing files found in the path you > specified, or an empty

Re: [PHP] Differences

2012-10-03 Thread David McGlone
On Wednesday, October 03, 2012 10:01:50 PM James wrote: > All of the images are displaying because you're simply instructing the > function to print out each file found with your call to glob(). The glob() > function returns an indexed array containing files found in the path you > specified, or an

Re: [PHP] Differences

2012-10-03 Thread David McGlone
On Thursday, October 04, 2012 03:01:12 AM Timmy Sjöstedt wrote: > Hi David, > > A "return" statement will immediately halt execution of the current > function and return to where it was called. > > In your case, the foreach loop will execute once and find a return > statement, and thus halting ex

Re: [PHP] Differences

2012-10-03 Thread James
All of the images are displaying because you're simply instructing the function to print out each file found with your call to glob(). The glob() function returns an indexed array containing files found in the path you specified, or an empty array if no files were found or false if glob() failed

Re: [PHP] Differences

2012-10-03 Thread David McGlone
On Wednesday, October 03, 2012 08:55:29 PM admin wrote: > > Hi everyone, I have been playing around with some code the list helped me > > with a while back and I'm not grasping the concept between return and echo > and the PHP manual doesn't answer this, unless I'm missing something. There > is an

RE: [PHP] Differences

2012-10-03 Thread admin
function filename($prefix) { $array_to_return = array(); $matches = glob('images/property_pics/'.$prefix.'*'); foreach($matches as $filename){ $array_to_return[] = $filename; } return $array_to_return; } If this better explains it. The first return will stop the process you need to

Re: [PHP] Differences

2012-10-03 Thread Timmy Sjöstedt
Hi David, A "return" statement will immediately halt execution of the current function and return to where it was called. In your case, the foreach loop will execute once and find a return statement, and thus halting execution of the function and returning only the first filename. echo() i

RE: [PHP] Differences

2012-10-03 Thread admin
> Hi everyone, I have been playing around with some code the list helped me with a while back and I'm not grasping the concept between return and echo and the PHP manual doesn't answer this, unless I'm missing something. There is an > example at the very bottom of PHP's return manual, but it's conf

Re: [PHP] Differences between PHP on LAMP and PHP on Windows Servers

2012-05-31 Thread Bastien Koert
ashleysheridan.co.uk>" >> mailto:a...@ashleysheridan.co.uk>> >> Cc: Jeff Gates mailto:gat...@si.edu>>, >> "php-general@lists.php.net<mailto:php-general@lists.php.net>" >> mailto:php-general@lists.php.net>> >> Subject: Re: [PHP] Differences

Re: [PHP] Differences between PHP on LAMP and PHP on Windows Servers

2012-05-31 Thread Matijn Woudt
Jeff Gates mailto:gat...@si.edu>>, > "php-general@lists.php.net<mailto:php-general@lists.php.net>" > mailto:php-general@lists.php.net>> > Subject: Re: [PHP] Differences between PHP on LAMP and PHP on Windows Servers > > > > On Wed, May 23, 2012 at 9

Re: [PHP] Differences between PHP on LAMP and PHP on Windows Servers

2012-05-31 Thread Gates, Jeff
hp.net<mailto:php-general@lists.php.net>" mailto:php-general@lists.php.net>> Subject: Re: [PHP] Differences between PHP on LAMP and PHP on Windows Servers On Wed, May 23, 2012 at 9:35 PM, Ashley Sheridan mailto:a...@ashleysheridan.co.uk>> wrote: On Wed, 2012-05-23 at 20:54 +0200, Mat

Re: [PHP] Differences between PHP on LAMP and PHP on Windows Servers

2012-05-23 Thread Matijn Woudt
On Wed, May 23, 2012 at 9:35 PM, Ashley Sheridan wrote: > ** > On Wed, 2012-05-23 at 20:54 +0200, Matijn Woudt wrote: > > On Tue, May 22, 2012 at 8:15 PM, Gates, Jeff wrote: > > Can anyone tell me what differences I might encounter by working with PHP > > on a Unix server verses working with PHP

Re: [PHP] Differences between PHP on LAMP and PHP on Windows Servers

2012-05-23 Thread Ashley Sheridan
On Wed, 2012-05-23 at 20:54 +0200, Matijn Woudt wrote: > On Tue, May 22, 2012 at 8:15 PM, Gates, Jeff wrote: > > Can anyone tell me what differences I might encounter by working with PHP > > on a Unix server verses working with PHP on a Windows server. We use > > Windows production servers here

Re: [PHP] Differences between PHP on LAMP and PHP on Windows Servers

2012-05-23 Thread Matijn Woudt
On Tue, May 22, 2012 at 8:15 PM, Gates, Jeff wrote: > Can anyone tell me what differences I might encounter by working with PHP on > a Unix server verses working with PHP on a Windows server. We use Windows > production servers here but many of us would like to get more LAMP > environments. > >

Re: [PHP] Differences between PHP on LAMP and PHP on Windows Servers

2012-05-23 Thread Mark Rousell
On 22/05/2012 19:32, Ashley Sheridan wrote: > After that, you have file permissions. In Unix, you have file, owner and > group permissions; Windows has read/write permissions and I believe on > newer versions you can get something similar to what Unix/Linux has had > for the last however many years

Re: [PHP] Differences between PHP on LAMP and PHP on Windows Servers

2012-05-23 Thread Mark Rousell
On 22/05/2012 19:15, Gates, Jeff wrote: > Can anyone tell me what differences I might encounter by working with PHP on > a Unix server verses working with PHP on a Windows server. We use Windows > production servers here but many of us would like to get more LAMP > environments. > > So, I'm won

Re: [PHP] Differences between PHP on LAMP and PHP on Windows Servers

2012-05-22 Thread Ashley Sheridan
On Tue, 2012-05-22 at 14:15 -0400, Gates, Jeff wrote: > Can anyone tell me what differences I might encounter by working with PHP on > a Unix server verses working with PHP on a Windows server. We use Windows > production servers here but many of us would like to get more LAMP > environments. >

Re: [PHP] differences in between these env. variables

2012-01-31 Thread Tedd Sperling
On Jan 29, 2012, at 7:01 PM, Adam Richardson wrote: > On Sun, Jan 29, 2012 at 11:38 AM, Tedd Sperling > wrote: > On Jan 27, 2012, at 12:45 PM, Adam Richardson wrote: > > > On Fri, Jan 27, 2012 at 12:09 PM, Tedd Sperling > > wrote: > > On Jan 11, 2012, at 9:24 PM, tamouse mailing lists wrote:

Re: [PHP] differences in between these env. variables

2012-01-29 Thread Adam Richardson
On Sun, Jan 29, 2012 at 11:38 AM, Tedd Sperling wrote: > On Jan 27, 2012, at 12:45 PM, Adam Richardson wrote: > > > On Fri, Jan 27, 2012 at 12:09 PM, Tedd Sperling > wrote: > > On Jan 11, 2012, at 9:24 PM, tamouse mailing lists wrote: > > > > > Is there ever a case where SCRIPT_NAME does not equa

Re: [PHP] differences in between these env. variables

2012-01-29 Thread Matijn Woudt
On Sun, Jan 29, 2012 at 5:38 PM, Tedd Sperling wrote: > On Jan 27, 2012, at 12:45 PM, Adam Richardson wrote: > >> On Fri, Jan 27, 2012 at 12:09 PM, Tedd Sperling >> wrote: >> On Jan 11, 2012, at 9:24 PM, tamouse mailing lists wrote: >> >> > Is there ever a case where SCRIPT_NAME does not equal P

Re: [PHP] differences in between these env. variables

2012-01-29 Thread Tedd Sperling
On Jan 27, 2012, at 12:45 PM, Adam Richardson wrote: > On Fri, Jan 27, 2012 at 12:09 PM, Tedd Sperling > wrote: > On Jan 11, 2012, at 9:24 PM, tamouse mailing lists wrote: > > > Is there ever a case where SCRIPT_NAME does not equal PHP_SELF? > > Was this every answered? I would like to know. >

Re: [PHP] differences in between these env. variables

2012-01-27 Thread Adam Richardson
On Fri, Jan 27, 2012 at 12:09 PM, Tedd Sperling wrote: > On Jan 11, 2012, at 9:24 PM, tamouse mailing lists wrote: > > > Is there ever a case where SCRIPT_NAME does not equal PHP_SELF? > > Was this every answered? I would like to know. > > Cheers, > > tedd > Yep, can be different: http://stackove

RE: [PHP] differences in between these env. variables

2012-01-27 Thread admin
> -Original Message- > From: Tedd Sperling [mailto:tedd.sperl...@gmail.com] > Sent: Friday, January 27, 2012 12:09 PM > To: php-general. List > Subject: Re: [PHP] differences in between these env. variables > > On Jan 11, 2012, at 9:24 PM, tamouse mailing lists w

Re: [PHP] differences in between these env. variables

2012-01-27 Thread Matijn Woudt
On Fri, Jan 27, 2012 at 6:09 PM, Tedd Sperling wrote: > On Jan 11, 2012, at 9:24 PM, tamouse mailing lists wrote: > >> Is there ever a case where SCRIPT_NAME does not equal PHP_SELF? > > Was this every answered? I would like to know. > > Cheers, > > tedd I don't think it was answered, but I'll an

Re: [PHP] differences in between these env. variables

2012-01-27 Thread Tedd Sperling
On Jan 11, 2012, at 9:24 PM, tamouse mailing lists wrote: > Is there ever a case where SCRIPT_NAME does not equal PHP_SELF? Was this every answered? I would like to know. Cheers, tedd _ t...@sperling.com http://sperling.com -- PHP General Mailing List (http://www.php.net

Re: [PHP] differences in between these env. variables

2012-01-11 Thread tamouse mailing lists
On Wed, Jan 11, 2012 at 5:49 PM, Matijn Woudt wrote: > On Thu, Jan 12, 2012 at 12:26 AM, Haluk Karamete > wrote: >> I've grouped these env variables, each group returns the same values >> is there a difference? which ones do you use? which ones should I not >> use for the purposes listed below >>

Re: [PHP] differences in between these env. variables

2012-01-11 Thread Matijn Woudt
On Thu, Jan 12, 2012 at 12:26 AM, Haluk Karamete wrote: > I've grouped these env variables, each group returns the same values > is there a difference? which ones do you use? which ones should I not > use for the purposes listed below > You can find the answers here: http://nl3.php.net/manual/en/r

Re: [PHP] Differences with imap_headerinfo() between PHP 4.3.11 and 4.4.0?

2005-08-19 Thread Mike Walsh
""Richard Lynch"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Wrapping ob_start() / ob_get_contents() / ob_end_clean() around the > IMAP calls MIGHT let you catch the output and throw it away... > > That is a good idea, I will give that a shot. Thanks, Mike -- Mike Walsh

Re: [PHP] Differences with imap_headerinfo() between PHP 4.3.11 and 4.4.0?

2005-08-18 Thread Richard Lynch
Wrapping ob_start() / ob_get_contents() / ob_end_clean() around the IMAP calls MIGHT let you catch the output and throw it away... On Mon, August 15, 2005 11:07 am, Mike Walsh wrote: > I have an application which uses imap_headerinfo() to query an NNTP > server > and display some information as

Re: [PHP] Differences in arrays

2004-12-02 Thread Richard Lynch
> 1-I guess I need a way to make sure in the foreach > that when the first empty element is reached the loop > dies. Just to be sure you understand: You should really not die when you hit a blank. You should just SKIP it and process the rest. A user *might* choose to fill in the first and third

RE: [PHP] Differences in arrays

2004-12-02 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 02 December 2004 10:26, Stuart Felenstein wrote: > I have arrays set up in a user form. One type is from > a multi-select list. [] > I have 3 textfield elements all named

Re: [PHP] Differences in arrays

2004-12-02 Thread Mike Smith
> Yes, I did that and it works correctly now. I was > tryin g to better understand why the difference in the > behaviour. > > Stuart The first array is created by selecting individual elements from a muli-select list (My multi-select is a little hazy, but I think it's something like...) One (S

Re: [PHP] Differences in arrays

2004-12-02 Thread Stuart Felenstein
--- Mike Smith <[EMAIL PROTECTED]> wrote: > How about: > > > if ( is_array($_SESSION['schools'] ) ) { > foreach($_SESSION['schools'] as $h) { > If($h!=""){ //First added line > $query = "INSERT INTO Prof_Schools (ProfID, School) > VALUES ('$LID', '$h')"; > $res6 = run_query($query); > echo $quer

Re: [PHP] Differences in arrays

2004-12-02 Thread Mike Smith
How about: if ( is_array($_SESSION['schools'] ) ) { foreach($_SESSION['schools'] as $h) { If($h!=""){ //First added line $query = "INSERT INTO Prof_Schools (ProfID, School) VALUES ('$LID', '$h')"; $res6 = run_query($query); echo $query; } //End added line } } -- PHP General Mailing List

Re: [PHP] Differences between echoing the output gradually or returning it.

2004-09-22 Thread Curt Zirzow
* Thus wrote Marek Kilimajer: > Eduard Duran i Rosich wrote: > >Hi, > >I just wanted to know what are the main pros and cons between echoing > >the output some PHP script as it process the data and returning the > >whole output to echo it at once. > >I find the second way to be useful when I want t

Re: [PHP] Differences between echoing the output gradually or returning it.

2004-09-22 Thread Greg Donald
On Wed, 22 Sep 2004 22:10:07 +, Eduard Duran i Rosich <[EMAIL PROTECTED]> wrote: > I just wanted to know what are the main pros and cons between echoing > the output some PHP script as it process the data and returning the > whole output to echo it at once. > I find the second way to be useful

Re: [PHP] Differences between echoing the output gradually or returning it.

2004-09-22 Thread Marek Kilimajer
Eduard Duran i Rosich wrote: Hi, I just wanted to know what are the main pros and cons between echoing the output some PHP script as it process the data and returning the whole output to echo it at once. I find the second way to be useful when I want to add a header() line without concerning former

Re: [PHP] Differences in old php/apach. to new php/apach. cookieprocess?

2002-04-14 Thread Justin French
Um, have you search the manual at all I did two quick searches, and found some good hints... it may not be your problem, but, it's a good starting point, before asking questions. I started with setcookie(): "In PHP 3, multiple calls to setcookie() in the same script will be performed

Re: [PHP] Differences in old php/apach. to new php/apach. cookie process?

2002-04-14 Thread heinisch
Sorry, but this problem hasn´t been solved yet, It drives me crazy. At 12.04.2002 17:41, I wrote: >Hi Folks, >Does anybody know if there are differences in cookieprocessing >between >A.Suse 2.2.14-SMP/apache 1.3.12 / PHP 3.0.16 and >B.Suse 2.4.9 /apache 1.3.20 / PHP 4.0.6 >I have moved "working

Re: [PHP] Differences between PHP, ASP, JSP

2002-02-07 Thread Michael Kimsal
Tyler Longren wrote: > PHP could be used for online banking. Banks use ASP because there is > software already written in ASP for what they need. If that were the case it wouldn't take months of time with dozens of people working on projects to get the barely functional. The software banks

Re: [PHP] Differences between PHP, ASP, JSP

2002-02-07 Thread Erik Price
On Wednesday, February 6, 2002, at 10:14 PM, Ben Clumeck wrote: > I know there must be a tone of articles on the subject. Can anyone > give me > brief advantages and disadvantages between the 3 languages. Is there > something that one language specifically does that another doesn't? > > Coul

Re: [PHP] Differences between PHP, ASP, JSP

2002-02-06 Thread Tyler Longren
PHP could be used for online banking. Banks use ASP because there is software already written in ASP for what they need. Also, they use it because it's from Microsoft. Tyler - Original Message - From: "Ben Clumeck" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 0