MySQL Forums
Forum List  »  PHP

Re: Nested JSON in PHP
Posted by: Nasir khan
Date: September 04, 2017 03:53AM

$sth = mysqli_query("SELECT ...");
$rows = array();
while($r = mysqli_fetch_assoc($sth)) {
$rows[] = $r;
}
print json_encode($rows);

Options: ReplyQuote


Subject
Written By
Posted
July 08, 2017 08:57AM
Re: Nested JSON in PHP
September 04, 2017 03:53AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.