cdparmeter
New member
how do I take a string and turn it into an array here's what I want and what I'm trying to do.
$string=(Pulling from sql db) "1", "10", "100";
$array=array($sting);
this is how I would think you would do it but it outputs
[0]=>"1", "10", "100"
what I want is [0]=>1 [1]=>10 [2]=>100
and since I'm pulling from a data base the number of elements in the array will change depending on the entry. they will all be numbers but the numbers will also be of varying lengths. ie any number from 1 to who knows how big they're all id's for row entries.
$string=(Pulling from sql db) "1", "10", "100";
$array=array($sting);
this is how I would think you would do it but it outputs
[0]=>"1", "10", "100"
what I want is [0]=>1 [1]=>10 [2]=>100
and since I'm pulling from a data base the number of elements in the array will change depending on the entry. they will all be numbers but the numbers will also be of varying lengths. ie any number from 1 to who knows how big they're all id's for row entries.