Multi-Disciplinary Databases

"; $i = 0; foreach($databases as $database) { if($i > 0) { //title $title_raw = explode('"title":', $database); $title = explode(',', $title_raw[1]); $title[0] = str_replace('"', '', $title[0]); $title_clean = str_replace('[', '', $title[0]); $title_clean = str_replace(']', '', $title_clean); $title_clean = str_replace('(', '', $title_clean); $title_clean = str_replace(')', '', $title_clean); $title_clean = str_replace(' ', '', $title_clean); $title_clean = str_replace('-', '', $title_clean); $title_clean = "multi_" . $title_clean; //description $desc_raw = explode('"description":', $database); $desc = explode('",', $desc_raw[1]); //short description $short_raw = explode('"lds17":', $database); $short = explode('},', $short_raw[1]); $short[0] = str_replace('"', '', $short[0]); //provider $prov_raw = explode('"lds10":', $database); $prov = explode(',', $prov_raw[1]); //format $format_raw = explode('"lds12":', $database); $format = explode(',', $format_raw[1]); //subjects $sub_raw = explode('"subject":', $database); $sub = explode(',', $sub_raw[1]); //URL $tmp_raw = explode('"lds11":', $database); $tmp = explode(',', $tmp_raw[1]); $tmp[0] = str_replace('[', '', $tmp[0]); $tmp[0] = str_replace(']', '', $tmp[0]); $output .= ""; } $i++; } $output .= "
$i"; $output .= "

" . $title[0] . "

"; $output .= "
" . $short[0] . "
"; $output .= "
Description:
" . $desc[0] . "
"; $output .= "
Subject:
" . $sub[0] . "
"; $output .= "
Format:
" . $format[0] . "
"; $output .= "
Provider: " . $prov[0] . "
"; $output .= "

"; echo $output; curl_close($ch); $file = fopen("multi.html", "w") or die("Unable to open file!"); fwrite($file, $output); fclose($file); ?>