$result = mysql_query("SELECT * FROM users");
$values = array();
while($row = mysql_fetch_array($result))
{
$values[] = array($row['tried']);
}
return $values;
That only returns the word array when being called as a webservice. What am I missing or doing wrong?
It’s not returning the word ‘array’, it’s telling you that what is being returned is an array.
To see what is in the array, use either
var_dump($values);orprint_r($values);. The only difference is the format of the display.In addition, I don’t believe you need to declare array in your assignment to
$values.should work.
$valueswill still be an array.