get part of string and insert to array
Posted: Thu Nov 18, 2010 9:51 am
I got this long string.
I want to get the GPS2,Another Test GPS,,103.0000,0,2,0,79.2,,,79.2,79.2000,25.0000,39.6000,39.6000,39.6000,,206.0000,158.4000,79.2000,39.6000,158.4000
and insert each value in to a array.
But I got no clue how to do that.
ALL values of the entire string could/will be diffrent each time i call the function to get the string.
I figuer, as long as I can seperate that string, I can use explode to get the values to the array.
Code: Select all
,4320,,931,simple,a:1:{s:15:"info_buyRequest";a:3:{s:4:"uenc";s:56:"aHR0cDovL2JldGEudGVsbHlvdXJmcmllbmRzLnNlL2luZGV4LnBocC8,";s:7:"product";s:3:"931";s:3:"qty";i:1;}},,GPS2,Another Test GPS,,103.0000,0,2,0,79.2,,,79.2,79.2000,25.0000,39.6000,39.6000,39.6000,,206.0000,158.4000,79.2000,39.6000,158.4000,a:0:{},0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,,2
and insert each value in to a array.
But I got no clue how to do that.
ALL values of the entire string could/will be diffrent each time i call the function to get the string.
I figuer, as long as I can seperate that string, I can use explode to get the values to the array.