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
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
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
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
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 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
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
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
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
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
> 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
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 confu
On Wed, Oct 3, 2012 at 10:54 AM, A Freund wrote:
> Hello,
>
> I have a problem creating thumbnails with imagick. The code is working
> ok and the thumbnail is generated in the right size etc but when I try
> to place a PDF logo on the thumbnail it turns half transparent. I guess
> it has something
Hello,
I have a problem creating thumbnails with imagick. The code is working
ok and the thumbnail is generated in the right size etc but when I try
to place a PDF logo on the thumbnail it turns half transparent. I guess
it has something to do with that the PDF file is generated in InDesign
and pr
14 matches
Mail list logo