note 26666 added to language.types.array

From: Date: Fri, 08 Nov 2002 15:41:00 +0000
Subject: note 26666 added to language.types.array
Groups: php.notes 
Request: Send a blank email to php-notes+get-39170@lists.php.net to get a copy of this message
I have a problem with multidimensional arrays. One column in my array is integer and I want to sum it up, but something like this: $sum = $sum + {$array[$i][2]}; causes compiler error. On the other hand the code: $sum = $sum + $array[$i][$j]; (without { } ) gives no result (NULL). How can I solve this problem? I have already tried type casts etc. and nothing works... -- http://www.php.net/manual/en/language.types.array.php http://master.php.net/manage/user-notes.php?action=edit+26666 http://master.php.net/manage/user-notes.php?action=delete+26666 http://master.php.net/manage/user-notes.php?action=reject+26666

« previous php.notes (#39170) next »