You are here: Why does this foreach loop fail to work? « PHP Programming Language « IT news, forums, messages
Why does this foreach loop fail to work?

Posted by comp.lang.php on 12/16/76 11:59

[PHP]
$array = array($firstOrderByFieldIfClause, $groupByClause,
$orderByClause);
array_walk($array, create_function('&$a', '$a = substr($a, 0,
strrpos(trim($a), ",")); if ($a) $a = ", $a";'));
print_r("firstOrderByFieldIfClause = $firstOrderByFieldIfClause and
groupByClause = $groupByClause and orderByClause = $orderByClause<P>");
[/PHP]

Upon execution the fields within $array are never changed (verified by
checking code), and I don't understand why.

[quote]
firstOrderByFieldIfClause = IF(image_creation_date IS NULL OR
image_creation_date = '' OR image_creation_date LIKE '0000%', 'x',
NULL) AS image_creation_date_alt, and groupByClause =
image_creation_date_alt, and orderByClause = image_creation_date_alt
desc,
[/quote]

Please review and help, I'm utterly lost!

Thanx
Phil

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация