#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    43
    Rep Power
    14
    I have a checkbox form. Users will be forced to check 3 boxes. So, I'm fine getting the results stored as an array, say $results[]. Now, I want to break this array up into the 3 component parts so each one is a different variable. Can anyone help me? I want the values as different variables because I will eventually perform tests on them in a MySQL database.

  2. #2
  3. No Profile Picture
    Robert_J_Sherman
    Guest
    Devshed Newbie (0 - 499 posts)
    You can always perform a for loop on the $results Array... or if it's only 3 parts you can reference each element in the array at
    $results[0] etc..

    In short, you could say:
    $value1 = $results[0];
    $value2 = $results[1];
    $value3 = $results[2];

    etc...

    ------------------
    SnR Graphics,
    Low Cost Hosting and Web Development.

Similar Threads

  1. sort: find duplicate string elements in array
    By sciencelife in forum Java Help
    Replies: 3
    Last Post: January 27th, 2004, 01:29 PM
  2. C++ programming help.
    By Programming1 in forum C Programming
    Replies: 1
    Last Post: January 20th, 2004, 10:47 AM
  3. another remove array values from an array
    By robee in forum PHP Development
    Replies: 6
    Last Post: November 20th, 2003, 12:09 AM
  4. multi dimensional arrays - Can't grasp how to?
    By Kaleina in forum PHP Development
    Replies: 17
    Last Post: November 5th, 2003, 03:18 PM
  5. problem with array
    By Geekoidxp in forum PHP Development
    Replies: 3
    Last Post: October 12th, 2003, 01:22 PM

IMN logo majestic logo threadwatch logo seochat tools logo