Re: Multi Dimensional Arrays
| From: | Brad Hubbard | Date: | Tue, 09 Jan 2001 22:48:06 +0000 |
| Subject: | Re: Multi Dimensional Arrays | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-33573@lists.php.net to get a copy of this message | ||
Your question almost answered itself ;)
$array[0][0] = 54;
$array[0][1] = 6.00;
$array[1][0] = 65;
$array[1][1] = 5.50;
$array[2][0] = 43;
$array[2][1] = 3.37;
Cheers,
Brad
----- Original Message -----
From: "Brandon Orther" <brandon@webintellects.com>
To: "PHP User Group" <php-general@lists.php.net>
Sent: Sunday, January 09, 2000 11:30
Subject: [PHP] Multi Dimensional Arrays
> Hello,
>
> have a flat text file in the below format:
>
> -----------------------------------------
> 54=6.00
> 65=5.50
> 43=3.37
> -----------------------------------------
> The first number represents the product number and the second number
> represents the price. I have exploded this and created an array for each
> line. Now what I would like to do is create a multi dimensional array
that
> is like bellow:
>
> $array[0][0] == 54
> $array[0][1] == 6.00
>
> $array[1][0] == 65
> $array[1][1] == 5.50
>
> $array[2][0] == 43
> $array[2][1] == 3.37
>
>
> Does anyone know how I could do this?
>
> Thank you,
>
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> brandon@webintellects.com
> 800-994-6364
> www.webintellects.com
> --------------------------------------------
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>