Re: Need help with arrays PLEASE!!!
| From: | Jonathan Duncan | Date: | Tue, 08 Apr 2003 22:54:40 +0000 |
| Subject: | Re: Need help with arrays PLEASE!!! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-142971@lists.php.net to get a copy of this message | ||
Bob,
Your $row variable is already a multidimensional array that holds all the
arrays. What more are you trying to do?
Jonathan
"Bob Strasser" <bstrasser@telus.net> wrote in message
news:IOEJKJOCNENFMHGHJPPKMEBJCBAA.bstrasser@telus.net...
> I'mpulling multiple rows out of a MySQL database and inserting them into
> several arrays. After that I want to put all the arrays into one
> multi-dimensional array. Here is the code:
>
> while($row = mysql_fetch_row($mysql_result))
> {
> $invoicenum[] = $row[0];
> $name[] = $row[1];
> $address[] = $row[2];
> $city[] = $row[3];
> $state[] = $row[4];
> $zip[] = $row[5];
> }
>
> I want to put $invoicenum[], $name[], $address[], $city[], $state[],
$zip[]
> into 1 multi-dimensional array. Can anyone help me with this?
>