twitterfacebook

Hospital Directory

Find a Hospital

Search a Hospital

 Map of Locations

"; if ($rows==0){ //echo "No ".$type."(s) found in ".$county."
"; }else{ //echo $rows." ".$type."(s) found in ".$county."
"; } echo ""; /* * Use the result generated from the previous query to the database and * iterate through each item and display them in a table format. * * Maintained the featArr array which is used in generating the Google Maps * array to display in the map. */ foreach($companyResult as $item) { $ID = $item['id']; $resQuery= "SELECT ID, AVG(rating) as rating_a FROM hospcomments where ID = ? AND approved = 'Y' GROUP BY ID"; $resStatement = $pdo->prepare($resQuery); $resStatement->bindParam(1, $ID, PDO::PARAM_INT); $resStatement->execute(); $row = $resStatement->fetchAll(PDO::FETCH_ASSOC); $resComments[$ID] = $row; } /** * Destroy the database handler. */ $pdo = null; foreach($companyResult as $num => $bank) { $ratingImg = "Rate This!"; $count = $num; $featArr[$count]{$num."CenterName"}=$bank['biz_name']; $featArr[$count]{$num."City"}=ucwords($bank['e_city']); $featArr[$count]{$num."laty"}=$bank['loc_LAT_centroid']; $featArr[$count]{$num."longy"}=$bank['loc_LONG_centroid']; $featArr[$count]{$num."Streetaddy"}=$bank['e_address']; $featArr[$count]{$num."Zip"}=$bank['e_postal']; $featArr[$count]{$num."ID"}=$bank['id']; $featArr[$count]{$num."State"}=$bank['e_state']; $ID = $bank['id']; $bank_comments = $resComments[$ID]; if (is_array($bank_comments) && !empty($bank_comments) ) { $ratingImg = getStarRating($bank_comments[0]); } /* * Displays the blood banks in table layout */ if ($bgcolor == $rowcolor2) $bgcolor = $rowcolor1; else $bgcolor = $rowcolor2; echo ""; echo ""; echo ""; } echo "
Rating ?NameAddressCityStateZip
".$ratingImg."".$featArr[$count]{$num."CenterName"}."".$featArr[$count]{$num."Streetaddy"}."".ucwords(strtolower($featArr[$count]{$num."City"}))." ".$featArr[$count]{$num."State"}."".$featArr[$count]{$num."Zip"}."
";?>
"; //js array vars $name = "js_featArr"; $name2 = "js_realRows"; function phpArrayToJsArray($name,$array,$prePend='var ') { if (is_array($array)) { // Array recursion $result = $name.' = new Array();'."\n"; foreach ($array as $key => $value) { $result .= phpArrayToJsArray($name.'["'.$key.'"]',$value,''); } } else { // Base case of recursion $result = $name.' = "'.$array.'";'."\n"; } return $prePend.$result; } ?>

 Interactive Map of Hospital(s)