#37389 [Opn->Bgs]: Impossible to declare a 2 dimensions Array
| From: | derick@php.net | Date: | Wed, 10 May 2006 07:03:05 +0000 |
| Subject: | #37389 [Opn->Bgs]: Impossible to declare a 2 dimensions Array | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-96887@lists.php.net to get a copy of this message | ||
ID: 37389
Updated by: derick@php.net
Reported By: fourmi at lfi dot fr
-Status: Open
+Status: Bogus
Bug Type: *General Issues
Operating System: Linux Fedora core4
PHP Version: 5.1.4
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
.
Previous Comments:
------------------------------------------------------------------------
[2006-05-09 21:47:00] fourmi at lfi dot fr
Description:
------------
settype ( $tablo , "array array") ? not good
$tablo = array( array() ) ? not good
Why need to declare a 2 dim Array ?
Because :
$tablo[1][1] = "truc";
..
$tablo[2][1] = "machin";
$tablo[2][2] = "chose";
...
array_shift ($tablo[2]) run but give :
" PHP Warning: array_shift() The argument should be an array in
..."
But $tablo[2] is 1 dim array !
The only workaround is to declare at the begining :
$tablo[0] = array() !!!
( $tablo = array(); is not enought )
Expected result:
----------------
No warning
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37389&edit=1