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 the
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
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() is
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
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
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()
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 execution
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
On Wed, Oct 3, 2012 at 9:01 PM, James ja...@nixsecurity.org 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
On Wed, Oct 3, 2012 at 9:57 PM, David McGlone da...@dmcentral.net 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
On Wed, Oct 3, 2012 at 10:03 PM, tamouse mailing lists
tamouse.li...@gmail.com wrote:
On Wed, Oct 3, 2012 at 9:57 PM, David McGlone da...@dmcentral.net 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
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
@lists.php.netmailto:php-general@lists.php.net
php-general@lists.php.netmailto: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
a...@ashleysheridan.co.ukmailto:a...@ashleysheridan.co.uk wrote:
On Wed, 2012
: Jeff Gates gat...@si.edumailto:gat...@si.edu,
php-general@lists.php.netmailto:php-general@lists.php.net
php-general@lists.php.netmailto: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
...@ashleysheridan.co.uk
a...@ashleysheridan.co.ukmailto:a...@ashleysheridan.co.uk
Cc: Jeff Gates gat...@si.edumailto:gat...@si.edu,
php-general@lists.php.netmailto:php-general@lists.php.net
php-general@lists.php.netmailto:php-general@lists.php.net
Subject: Re: [PHP] Differences between PHP on LAMP and PHP
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
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
On Tue, May 22, 2012 at 8:15 PM, Gates, Jeff gat...@si.edu 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
On Wed, 2012-05-23 at 20:54 +0200, Matijn Woudt wrote:
On Tue, May 22, 2012 at 8:15 PM, Gates, Jeff gat...@si.edu 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
On Wed, May 23, 2012 at 9:35 PM, Ashley Sheridan
a...@ashleysheridan.co.ukwrote:
**
On Wed, 2012-05-23 at 20:54 +0200, Matijn Woudt wrote:
On Tue, May 22, 2012 at 8:15 PM, Gates, Jeff gat...@si.edu wrote:
Can anyone tell me what differences I might encounter by working with PHP
on a Unix
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.
On Jan 29, 2012, at 7:01 PM, Adam Richardson wrote:
On Sun, Jan 29, 2012 at 11:38 AM, Tedd Sperling tedd.sperl...@gmail.com
wrote:
On Jan 27, 2012, at 12:45 PM, Adam Richardson wrote:
On Fri, Jan 27, 2012 at 12:09 PM, Tedd Sperling tedd.sperl...@gmail.com
wrote:
On Jan 11, 2012, at
On Jan 27, 2012, at 12:45 PM, Adam Richardson wrote:
On Fri, Jan 27, 2012 at 12:09 PM, Tedd Sperling tedd.sperl...@gmail.com
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
On Sun, Jan 29, 2012 at 5:38 PM, Tedd Sperling tedd.sperl...@gmail.com wrote:
On Jan 27, 2012, at 12:45 PM, Adam Richardson wrote:
On Fri, Jan 27, 2012 at 12:09 PM, Tedd Sperling tedd.sperl...@gmail.com
wrote:
On Jan 11, 2012, at 9:24 PM, tamouse mailing lists wrote:
Is there ever a case
On Sun, Jan 29, 2012 at 11:38 AM, Tedd Sperling tedd.sperl...@gmail.comwrote:
On Jan 27, 2012, at 12:45 PM, Adam Richardson wrote:
On Fri, Jan 27, 2012 at 12:09 PM, Tedd Sperling tedd.sperl...@gmail.com
wrote:
On Jan 11, 2012, at 9:24 PM, tamouse mailing lists wrote:
Is there ever a
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
On Fri, Jan 27, 2012 at 6:09 PM, Tedd Sperling tedd.sperl...@gmail.com 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
-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 wrote:
Is there ever a case
On Fri, Jan 27, 2012 at 12:09 PM, Tedd Sperling tedd.sperl...@gmail.comwrote:
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:
On Thu, Jan 12, 2012 at 12:26 AM, Haluk Karamete
halukkaram...@gmail.com 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:
On Wed, Jan 11, 2012 at 5:49 PM, Matijn Woudt tijn...@gmail.com wrote:
On Thu, Jan 12, 2012 at 12:26 AM, Haluk Karamete
halukkaram...@gmail.com 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
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 -
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
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
--- 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 $query;
} //End
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...)
select
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
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
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
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 when
* 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 to add a
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 pages
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
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?
Could PHP
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
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 06,
46 matches
Mail list logo