Completed web programming project #44
@ -139,7 +139,9 @@ function ajax_search_ingredient()
|
||||
search: $search_query
|
||||
);
|
||||
$result['count'] = count($ingredients);
|
||||
$result['result'] = $ingredients;
|
||||
$result['result'] = array_map(function($ing) {
|
||||
return $ing->getAssocArr();
|
||||
}, $ingredients);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user