Curt Zirzow wrote:
foreach(array_slice($filenames, 0, 2) as $filename) {
$files[] = "path/to/" . $filelname;
}
Will a function (such as the array_slice here) in a foreach statement get re-evaluated for each iteration, or is it evaluated just once?
In other words, is there anyhing gained by doing:
$short_array = array_slice($filenames, 0, 2);
foreach($short_array as $filename) { $files[] = "path/to/" . $filelname; }
/Mattias
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php