php-general Digest 3 Oct 2012 15:54:46 -0000 Issue 7991

2012-10-03 Thread php-general-digest-help
php-general Digest 3 Oct 2012 15:54:46 - Issue 7991 Topics (messages 319324 through 319341): Re: problem with my login script 319324 by: Rodrigo Silva dos Santos 319325 by: Bálint Horváth 319326 by: Rodrigo Silva dos Santos 319327 by: Bálint Horváth

[PHP] generate a thumbnail with imagick and place a logo on top

2012-10-03 Thread A Freund
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

Re: [PHP] generate a thumbnail with imagick and place a logo on top

2012-10-03 Thread tamouse mailing lists
On Wed, Oct 3, 2012 at 10:54 AM, A Freund ad-fre...@web.de 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

[PHP] Differences

2012-10-03 Thread 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 very bottom of PHP's return manual, but it's

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

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() is

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

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 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()

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 execution

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 tamouse mailing lists
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

Re: [PHP] Differences

2012-10-03 Thread tamouse mailing lists
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

Re: [PHP] Differences

2012-10-03 Thread tamouse mailing lists
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

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