SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Allow Multiple Products in Array

  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2004
    Location
    griffith
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Allow Multiple Products in Array

    Newbie question. I have an array that currently outputs a single product:
    HTML Code:
    "Product" => $product_code
    If I want to allow for multiple product_codes (in an instance where user chooses more than one product), how would I change the array to allow for multiple products?

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Arrays can contain arrays

    PHP Code:
    $array['product'] => array('product1''product2''product3'); 
    17-29% of paid ad clicks are fraudulent. Get protected with Improvely, your online marketing dashboard.
    Conversion tracking, click fraud detection, A/B testing and more.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •