Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: [PHP-DB] Array
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 t
o
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

Report this thread to moderator Post Follow-up to this message
Old Post
Micah Stevens
08-27-04 01:56 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP DB archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:57 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.