note 65883 added to function.array
| From: | fourmi at lfi dot fr | Date: | Tue, 09 May 2006 20:26:07 +0000 |
| Subject: | note 65883 added to function.array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-110962@lists.php.net to get a copy of this message | ||
Comment déclarer un tablo à 2 dimensions ?
settype ( $tablo , "array array") ? not good
$tablo = array( array() ) ? not good
Pourquoi avoir besoin de déclarer un tablo à 2 dimensions ?
parce qu'en faisant :
$tablo[1][1] = "truc";
..
$tablo[2][1] = "machin";
...
array_shift ($tablo[2]) sort un :
" PHP Warning: array_shift() The argument should be an array in ..."
Alors que c'est un tablo !! ( Ã une dimension)
le seul contournement trouvé est de déclarer en début :
$tablo[0] = array() !!!
Y-a-t-il une autre méthode ?
----
Server IP: 195.221.21.36
Probable Submitter: 81.57.228.62
----
X-Spam-Status: Yes, hits=7.4 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER,
HEAD_ILLEGAL_CHARS autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.array.php
Edit -- http://master.php.net/note/edit/65883
Del: integrated -- http://master.php.net/note/delete/65883/integrated
Del: useless -- http://master.php.net/note/delete/65883/useless
Del: bad code -- http://master.php.net/note/delete/65883/bad+code
Del: spam -- http://master.php.net/note/delete/65883/spam
Del: non-english -- http://master.php.net/note/delete/65883/non-english
Del: in docs -- http://master.php.net/note/delete/65883/in+docs
Del: other reasons-- http://master.php.net/note/delete/65883
Reject -- http://master.php.net/note/reject/65883
Search -- http://master.php.net/manage/user-notes.php