Never needed to create an array from with this method, and it should be doable. Can someone please assist?
I have a field in a database that is defined as a series of coordinates. FYi in the below example the item being recalled is defined as such:
[color=red]$prov[‘coords’]=’168,332,189,345,191,360,180,364,168,378,143,373,140,366,147,352,150,331′
I am recalling that from the database and trying to place it into an array at looks like this:
[code]
Array (
[0] => 168
[1] => 332
[2] => 189
[3] => 345
[4] => 191
[5] => 360
[6] => 180
[7] => 364
[8] => 168
[9] => 378
[10] => 143
[11] => 373
[12] => 140
[13] => 366
[14] => 147
[15] => 352
[16] => 150
[17] => 331
)
I tried this, and it did not work properly:
[code=php]
$sql = mysql_query(“SELECT coords FROM `tbl` WHERE id=’1′”);
while ($prov = mysql_fetch_assoc ($prov_sql) ){
$values = array(($prov[‘coords’]));
}
So, realizing what it was doing, I though perhaps I would put [color=red][i]print($prov[‘coords’])
If you would like to see an example, let me know.