I have a database field with this in it:"3:1,4:2,1:3" without the quotes.
I retrieved the field and exploded the commas, so now I have an array with the values:
Now what I want to do, is basically 'explode' the ':' and put each number on either side of the colon into two separate variables, for every element in the array, but I can't figure out how to do it.
Basically what I want is $var1=3, $var2=1, $var3=4, etc..
Any suggestions/solutions?
Thanks
I retrieved the field and exploded the commas, so now I have an array with the values:
PHP Code:
[0] => 3:1 [1] => 4:2 [2] => 1:3
Basically what I want is $var1=3, $var2=1, $var3=4, etc..
Any suggestions/solutions?
Thanks
Comment