Re: printing values from a 2 dimension array
| From: | bob pilly | Date: | Wed, 15 Oct 2003 14:05:45 +0000 |
| Subject: | Re: printing values from a 2 dimension array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-166211@lists.php.net to get a copy of this message | ||
Yes it is what i expect to be stored in the array.
Array ( [0] => Array ( [0] => 0 [1] => 4 [2] => 1 [3] => 1 [4] => 0 [5] => 2
[6] => 0 [7] => 0 [8] => 0 [9] => 0 ) [1] => Array ( [0] => 0 [1] => 5 [2]
=> 3 [3] => 5 [4] => 3 [5] => 3 [6] => 0 [7] => 13 [8] => 0 [9] => 1 ) )
That is one array stored in $rslt[0] and another in $rslt[1] (perhaps i am not understanding arrays
correctly?)
The thing that confuses me is if i assign the contents of an array member to a variable, and then
print it, i get the result i am after,for example
$avar = $rslt[0][1];print $avar;
will return '4' as i would expect from the output of print_r.
Cheers
Bob
Jason Wong <php-general@gremlins.biz> wrote:
On Wednesday 15 October 2003 21:02, bob pilly wrote:
> print $rslt[0][1];
What does print_r($rslt) give you? Is it what you expected?
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
%DCL-MEM-BAD, bad memory
VMS-F-PDGERS, pudding between the ears
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---------------------------------
Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger