Re: Array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since you provided no value's it's a little tough, but the general for would 
be:

$parts = array(
  array("PN" => $row1col1, "Desc" => $row1col2, "Qty" => $row1col3),
  array("PN" => $row2col1, "Desc" => $row2col2, "Qty" => $row2col3)
 );

Depending on your implimentation, it maybe easier to use some sort of loop to 
assign things. If you wanted the array to be persistant across pages, you'd 
want to user instead of $parts, $_SESSION['parts']. (assuming of course you 
have initialized a session)

I personally would skip the array stuff and just pop it in a database. 
-Micah 

On Thursday 26 August 2004 02:11 pm, 'Miguel Guirao' wrote:
> Hi!!
>
> I have a table with many options from when the user can select them,
> after that, his/her selections will be stored in a database.
>
> In the mean time, I want to store his/her selections in an array like
> this one:
>
>     PN    Desc    Qty
>
> |-----------------------|----------------------|-----------------------|
> |-----------------------|----------------------|-----------------------|
> |-----------------------|----------------------|-----------------------|
>
> How do I declare Duch an array like this??, let's call it Parts.
>
>
> Miguel Guirao
> Servicios Datacard
> www.SIASA.com.mx

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux