Multidimensional arrays
| From: | Gary Broughton | Date: | Fri, 18 Jul 2003 13:33:29 +0000 |
| Subject: | Multidimensional arrays | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-155760@lists.php.net to get a copy of this message | ||
Hi
Can anybody help me grasp multidimensional arrays please? Basically, I am
retrieving all records from one table (two fields), and want to return them
in an array.
I am converting code from ASP to PHP, and in the former I did something like
this:
select id, name from customer
redim custarray(recordcount,2)
i = 0
while not eof
custarray(i,0) = id;
custarray(i,1) = name;
i = i+1;
movenext
wend
... but all my efforts to store them in the same kind of way in PHP have
proved fruitless. Any advice would be much appreciated.
Many thanks
Gary