pass product descrip to php array

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • txguy
    New Member
    • Aug 2007
    • 22

    #1

    pass product descrip to php array

    have a php shopping cart that uses a product array to build the order form.


    Code: ( php )
    $products=array (
    array ("item01", "descriptio n", price),
    array ("item02", "descriptio n", price),
    array ("item03", "descriptio n", price),
    );


    we're trying to pass the itemnumber, description, and price to this script form a html page that has these fields defined in checkbox fields. the html page has over 1210 checkboxes and we want to pass the "checked" field data onsubmit.

    any help would be greatly appreciated.

    thank you.
  • etiainen
    New Member
    • Aug 2007
    • 40

    #2
    Good programming can't fix a bad design...

    Here's a hint though:
    you can add stuff to a php array like this:
    [PHP]
    $someArray=arra y();
    for($i=0; $i<1210; $i++)
    $someArray[]=array("item_". $i, "something" , $somethingelse) ;

    //or like this:
    $someArray["betaphetamyne_ price"]=1000;
    $someArray[666]=$theBeast;
    [/PHP]

    Comment

    Working...