Jump to content

tcicatelli

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

tcicatelli's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi- I'm writing an application that extracts a ton of information from a client and pushes it to a server in an associative array.  What I am looking to do, is be able to create a foreach loop to take the "laundry array" and extract "shirt", "red", "clean" and "pants", "blue", "dirty" as separate variables so I can insert them into a mysql table.  I want to ignore all the client_info data because I take care of that separately, since I know there's always just one client, but  I'm never sure of how many "laundry" items will be forwarded.  Here's a sample data dump: array(2) {   ["client_info"]=>   array(2) {     ["client_fname"]=>     string(20) "John"     ["client_lname"]=>     string(20) "Smith"   }   ["laundry"]=>   array(2) {     ["Shirt"]=>     array(2) {       ["color"]=>       string(15) "red"       ["status"]=>       string(5) "clean"     }     ["Pants"]=>     array(2) {       ["color"]=>       string(15) "blue"       ["status"]=>       string(5) "dirty"     }   } } I'm hoping to be able to write: mysql_query("INSERT INTO Inventory (Item, Color, Status ) VALUES($item, $color, $status)") I hope I've explained this well enough. Thanks, -Tom
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.