RE: Differences

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 put the information into
an array and then return the array outside of the foreach loop.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux