jsonobjects sudently return empty
It seems what mysqli_fetch_array($res))
returns empty result.You can check this: add echo into cycle:
while($row = mysqli_fetch_array($res)) { print_r($row); array_push($result, array( 'ID'=>$row[0], 'NAME'=>$row[1], 'URL'=>$row[2] ));}
Check also connect with database. Add these two lines before connect to show errors
error_reporting(E_ALL);ini_set('display_errors', 1);