response->docs); // Search for the application ID in the content element and display it $content = $json->response->docs[$random]->content; preg_match('/Application.*\n(.*)\n/', $content, $application_id); $output['application_id'] = $application_id[1]; // Search for the publication URL in the content element and display it $content = $json->response->docs[$random]->content; preg_match('/Publication.*\n(.*)\n/', $content, $publication); $output['publication_url'] = $publication[1]; // Search for the title in the content element and display it $content = $json->response->docs[$random]->content; preg_match('/Title.*\n(.*)\n/', $content, $title); $output['title'] = $title[1]; // Search for the abstract in the content element and display it $content = $json->response->docs[$random]->content; preg_match('/Abstract.*\n(.*)\n/', $content, $abstract); $output['abstract'] = $abstract[1]; return $output; } ?>