hello all, i want to fill a table like this…
[code=php]
$recipes = array(
‘Alfalfa’ => array(‘image’ => ‘images/autocomplete/fruits/alfalfa.jpg’, ‘description’ => ‘One cup of raw, sprouted alfalfa see ..’),
‘Artichoke’ => array(‘image’ => ‘images/autocomplete/fruits/artichoke.jpg’, ‘description’ => ‘One medium artichoke cooked with …’),
);
and do it like this, it works but load one row not two:
[code=php]
$recipes = array();
while($sbrow_jok=mysql_fetch_array($sbrs_jok)){
$descr = substr($sbrow_jok[‘sb_description’],0,90);
if(strlen($sbrow_jok[‘sb_description’])>90){
$descr .= ” …”;
}
unset($arr);
$arr = array(‘image’ => ”.loadimage( $sbrow_jok[‘sb_dish_image’], $sbrow_jok[‘sb_dish_isdefault’], ‘2’).”, ‘description’ => ”.$descr.”);
$recipes = array(”.$sbrow_jok[‘sb_title’].” => $arr);
}
any help????
if i do like this doesnt works either…
$recipes[] = array(”.$sbrow_jok[‘sb_title’].” => $arr);