I am using following php script and it is returning an array to me. How can i get the data out of this array as i am using j as httpjob, but httpjob does not have a get array type of method.
$result = $conn->query("SELECT * FROM menuitems");
if ($result->num_rows > 0) {
$rows = array();
while($r = $result->fetch_assoc()) {
$rows[] = $r;
}
} else {
echo "0 results";
}
echo $rows;
$result->close();
i want trying to convert the array to string using json on the php script side but it is giving me error as json is not supported on the domain where my php script is running
$result = $conn->query("SELECT * FROM menuitems");
if ($result->num_rows > 0) {
$rows = array();
while($r = $result->fetch_assoc()) {
$rows[] = $r;
}
} else {
echo "0 results";
}
echo $rows;
$result->close();
i want trying to convert the array to string using json on the php script side but it is giving me error as json is not supported on the domain where my php script is running