How to return entire mysql table with php? -
$result = mysql_query("select * users"); $values = array(); while($row = mysql_fetch_array($result)) { $values[] = array($row['tried']); } return $values; that returns word array when being called webservice. missing or doing wrong?
it's not returning word 'array', it's telling being returned array.
to see in array, use either var_dump($values); or print_r($values);. difference format of display.
in addition, don't believe need declare array in assignment $values.
$values[] = $row['tried']; should work. $values still array.
Comments
Post a Comment