<?
$arrResult=array();
$select=mysql_query("select * from tb_example") or die (mysql_error());
$num_field=mysql_num_fields($select);
while($row=mysql_fetch_array($query)){
$arrCol=array();
for($i=0;$i<=$num_field;$i++){
$arrCol[mysql_field_name($select,$i)]=$row[$i];
$selectPic=mysql_query("select * from tb_picture WHERE id='".$row['id']."'") or die (mysql_error());
while($pic=mysql_fetch_array($selectPic)){
$arrCol['picture']=$pic['picture'];
}
}
$arrResult=array_push($arrResult,$arrCol);
}
echo json_encode($responses);
?>