I have column in mysql where are some words.
For example word,dog,cat,tree..
Is it possible to create php array like this?
$array=array("word","dog","cat","tree");
You can simply use php explode()
function
$row=mysql_fetch_assoc($result);
or
$row=$pdo->fetch(PDO::FETCH_ASSOC);
$newarray=explode(",",$row["data"]);
You mean you want to split them by commas? Use explode
:
$items = explode(',', $columnValue);