note 12055 added to function.array.php
| From: | slicky at newshelix dot com | Date: | Tue, 20 Mar 2001 18:57:15 +0000 |
| Subject: | note 12055 added to function.array.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-12587@lists.php.net to get a copy of this message | ||
Notice that you can also add arrays to other arrays with the $array[] "operator" while the
dimension doesn't matter.
Here's an example:
$x[w][x] = $y[y][z];
this will give you a 4dimensional assosiative array.
$x[][] = $y[][];
this will give you a 4dimensional non assosiative array.
So let me come to the point. This get interessting for shortening things up. For instance:
foreach ($lines as $line){
if(!trim($line)) continue;
$tds[] = explode("$delimiter",$line);
}
http://www.php.net/manual/en/function.array.php