} if ($books === false) { return; } $bookNames = array(); $bookCount = count($books['books']); for ($i = 0; $i < $bookCount; $i++) { $book = $books['books'][$i]; $bookNames[$i] = $book->name . "_" . $book->bookId . "_" . $book->sunccoNo; } echo JSON($bookNames); return; break; case 'getpersons': if ($type == 0) { $persons = PersonManager::searchPersons($query, 1, -1); } else { $persons = PersonManager::searchPersonsBySunccoNo($query, 1, -1); } if ($persons === false) { return; } $personNames = array(); $personCount = count($persons['persons']); for ($i = 0; $i < $personCount; $i++) { $person = $persons['persons'][$i]; $personNames[$i] = $person->name . "_" . $person->personId . "_" . $person->sunccoNo; } echo JSON($personNames); return; break;