Hi,
Is it possible to split a variable such as:
Into four different variables?
I have managed to split it into an array by doing this:
But if that is the way to go about it then how can I change that into something usefull like:
I know that there will always be only four values.
Thanks
Is it possible to split a variable such as:
$variable = '1,2,3,4';
Into four different variables?
I have managed to split it into an array by doing this:
$array = explode(',',$variable);
But if that is the way to go about it then how can I change that into something usefull like:
$array['one'] = 1;
$array['two'] = 2;
$array['three'] = 3;
$array['four'] = 4;
I know that there will always be only four values.
Thanks