Jump to content

extract information from an array


najibla

Recommended Posts

Is there any way to transform an array looking like this:

    Array ( [level-1] => 2 [quarter-1] => 1 [year-1] => 2014 [level-2] => 2 [quarter-2] => 2 [year-2] => 2015 [level-49] => 2 [quarter-49] => 2 [year-49] => 2015 [level-58] => 1 [quarter-58] => 1 [year-58]

and take only the numbers after the keywords to use them in an sql table. For example, the table would look like:

     ID 1 Level 2 Quarter 1 Year 2014
     ID 2 level 2 quater 2 Year 2015
     ID 49 level 2 quarter 2 year 2015

Etc

Link to comment
https://forums.phpfreaks.com/topic/276213-extract-information-from-an-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.