Hello,
I'm trying to convert a string that contains comma separated values into array:
----------------------------------------------------------------------------------------------------------------
$dresult = mysql_query("SELECT * FROM devices WHERE device= '$serial' ");
while($row = mysql_fetch_array($dresult))
{
$favlist = array($row['Favourites']);
}
------------------------
cell contains values like "c34,f54,a22,e32"
print_r($favlist) gives out:
Array
(
[0] => c34,f54,a22,e32
)
and I would like to have it like this:
Array
(
[0] => c34
[1]=>f54
[2]=>a22
[3]=>e32
)
How do I do that?
I'm trying to convert a string that contains comma separated values into array:
----------------------------------------------------------------------------------------------------------------
$dresult = mysql_query("SELECT * FROM devices WHERE device= '$serial' ");
while($row = mysql_fetch_array($dresult))
{
$favlist = array($row['Favourites']);
}
------------------------
cell contains values like "c34,f54,a22,e32"
print_r($favlist) gives out:
Array
(
[0] => c34,f54,a22,e32
)
and I would like to have it like this:
Array
(
[0] => c34
[1]=>f54
[2]=>a22
[3]=>e32
)
How do I do that?