Strange Array Error
| From: | Shaun | Date: | Thu, 21 Oct 2004 13:28:26 +0000 |
| Subject: | Strange Array Error | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-199973@lists.php.net to get a copy of this message | ||
Hi,
I have been trying for the past two hours to understand why I get an error
with the following code:
<?php
$test_array[] = array();
$i = 0;
while($i < 7){
$test_array[$i] += $i;
echo '$day_total[$i] = '.$day_total[$i].'<br>';
}
?>
Fatal error: Unsupported operand types in
/usr/home/expensesystem/public_html/test.php on line 5
I am trying to create a loop where $i is added to array element $i, and
can't find any information relating to this on google or php.net...
Thanks for your advice.