0){ while($row = mysql_fetch_object($result)){ $link = "node/".$row->vid; $image = $row->filepath; //$string .= "
\n"; $json .= "{link:'$link', image:'/$image'},"; } $json = substr($json, 0, -1); } $json .= "]}"; echo $json; ?>