array key's: which is correct?
| From: | Tanel Tammik | Date: | Tue, 08 Jun 2010 13:12:42 +0000 |
| Subject: | array key's: which is correct? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-305948@lists.php.net to get a copy of this message | ||
Hi,
which one is correct or "better"?
$array[3] = '';
or
$array['3'] = '';
$i = 7;
$array[$i] = '';
or
$array["$i"] = '';
Br
Tanel