Hello! Here is my php code:
$query = 'SELECT * from infourl'; $result = mysqli_query($con, $query) or die("Invalid Query, " . mysql_error()); while( $row = mysqli_fetch_object($result) ) { $rows['info'] = array($row); } echo json_encode($rows); And here is the result:
{ "info":[ { "id":"2", "url":"http:\/\/video2.php", "title":"Two Video", "comment":"Two Comment" } ] } But I have 2 records in the database, but only one output. Why ???? Help pliz.
$rows['info']- Dmitry at each iteration of the cycle