multi-dimensional arrays and/or strings vs. numbers
| From: | Bill Rausch | Date: | Thu, 27 Sep 2001 23:33:07 +0000 |
| Subject: | multi-dimensional arrays and/or strings vs. numbers | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-69073@lists.php.net to get a copy of this message | ||
I'm totally confused about the following code:
<?php
$t=3.3;
echo "t=$t<br>";
echo "t=".$t."<br>";
$u = array(0.1,1.1,2.1,3.1);
echo "u[0]=$u[0]<br>";
echo "u[0]=".$u[0]."<br>";
$v = array( array(0.1,1.1,2.1,3.1),
array(0.11,1.11,2.11,3.11),
array(0.12,1.12,2.12,3.12),
array(0.13,1.13,2.13,3.13) );
echo "v[0][0]=$v[0][0]<br>";
echo "v[0][0]=".$v[0][0]."<br>";
?>
which when executed produces:
t=3.3
t=3.3
u[0]=0.1
u[0]=0.1
v[0][0]=Array[0]
v[0][0]=0.1
Why is the echo of the multi-dimensional array item within the quotes different? Is it in the manual (I swear I've looked)?
--
Bill Rausch, Software Development, Unix, Mac, Windows
Numerical Applications, Inc. 509-943-0861 bill@numerical.com