I have table like this:
table Database
+------+--------------+
| name | data |
+------+--------------+
| foo | certaindata1 |
| bar | certaindata2 |
| foo | certaindata3 |
+------+--------------+
and I want to output data for array values like:
array('certaindata1','certaindata2','certaindata3')
I have try this
$sql = mysql_query("SELECT data FROM Database");
while($row=mysql_fetch_array($sql)){
echo $row['data'];
}
and result is certaindata1certaindata2certaindata3
where array value should be 'certaindata1','certaindata2','certaindata3'