NYCPHP Meetup

NYPHP.org

[nycphp-talk] Casting and list

PUTAMARE jeffknight at mac.com
Mon Dec 22 13:26:41 EST 2003


On Dec 22, 2003, at 1:22 PM, PUTAMARE wrote:
> foreach ($row as $key => $value) $$key = (is_numeric($value) and 
> (intval($value) == $value))?(int) $value:$value;

probably should be

if (is_array($row)) foreach ($row as $key => $value) $$key = 
(is_numeric($value) and (intval($value) == $value))?(int) 
$value:$value;


Jeff Knight
jeff not junkmail at lushmedia.com
212/213-6558 x 203
LUSH media
110 W 40th St #1502
New York, NY 10018




More information about the talk mailing list