- if (DBA::is_result($r)) {
- foreach($r as $rr)
- $results[] = [
- 'name' => $rr['name'],
- 'url' => System::baseUrl() . '/profile/' . $rr['nickname'],
- 'photo' => System::baseUrl() . '/photo/avatar/' . $rr['uid'] . '.jpg',
- 'tags' => str_replace([',',' '],[' ',' '],$rr['pub_keywords'])
- ];
+ while($search_result = DBA::fetch($search_stmt)) {
+ $results[] = [
+ 'name' => $search_result['name'],
+ 'url' => DI::baseUrl() . '/profile/' . $search_result['nickname'],
+ 'photo' => DI::baseUrl() . '/photo/avatar/' . $search_result['uid'] . '.jpg',
+ 'tags' => str_replace([',', ' '], [' ', ' '], $search_result['pub_keywords'])
+ ];