i am use this code what change in this code
<?php
$mysqli = new mysqli ( 'mysql2.000webhost.com', 'a8124593_local', 'root123', 'a8124593_test');
// Check if album id is posted as GET parameter
$myq = $mysqli ->query ( 'SELECT id, url, name FROM babyapp' );
while ( $myr = $myq->fetch_assoc () ) {
$array = (array("items"=>(array(
'id' => $myr['id'],
'name' => $myr['url'],
'songs_count' => $myr['name'],
))));
$arr_result[] = $array;
}
echo json_encode($arr_result);
?> result: http://pixelerbricks.net78.net/youtubeapp/babyapp.php
but my format wrong pls help me i would like to result in this format like. what change in my code for result give in below like format
{
"items":
[
{
"id":1,
"name":"China",
"url":"http://www.androidbegin.com/tutorial/flag/china.png"
},
{
"id":2,
"name":"india",
"url":"http://www.androidbegin.com/tutorial/flag/china.png"
}
]
}