{'feed'}->{'entry'}; // Get a list of the 2nd to 16th row and put into an array // 0:Parent Node | 1:Level 1 | 2:Level 2 | 3:Level 3 | 4:Level 4 | 5:Level 5 | 6:Topic Names | 7:Microscopic Features | 8:Normal Values | 9:May Resemble | 10:Differential Diagnosis | 11: Classic Immunophenotype | 12:Cartoon | 13:Image | 14:Misc | 15:Additional Images $row_id_text = 'Row: ' . $compare_topics[0]; foreach ($rows as $row) { if ($row->{'title'}->{'$t'} == $row_id_text) { $atlas_data[0]['parent_node'] = $row->{'gsx$parentnode'}->{'$t'}; $atlas_data[0]['level_1'] = $row->{'gsx$level1'}->{'$t'}; $atlas_data[0]['level_2'] = $row->{'gsx$level2'}->{'$t'}; $atlas_data[0]['level_3'] = $row->{'gsx$level3'}->{'$t'}; $atlas_data[0]['level_4'] = $row->{'gsx$level4'}->{'$t'}; $atlas_data[0]['level_5'] = $row->{'gsx$level5'}->{'$t'}; $atlas_data[0]['topic_name'] = $row->{'gsx$topicname'}->{'$t'}; $atlas_data[0]['microscopic_features'] = $row->{'gsx$microscopicfeatures'}->{'$t'}; $atlas_data[0]['normal_values'] = $row->{'gsx$normalamountinperipheralbloodpbbonemarrowbmlymphoidtissueln'}->{'$t'}; $atlas_data[0]['may_resemble'] = $row->{'gsx$mayresembleuserownumberinx'}->{'$t'}; $atlas_data[0]['differential_diagnoses'] = $row->{'gsx$differentialdiagnosis'}->{'$t'}; $atlas_data[0]['classic_immunophenotype'] = $row->{'gsx$classicimmunophenotype'}->{'$t'}; $atlas_data[0]['cartoon'] = $row->{'gsx$cartoon'}->{'$t'}; $atlas_data[0]['image'] = $row->{'gsx$image'}->{'$t'}; $atlas_data[0]['misc'] = $row->{'gsx$misc'}->{'$t'}; $atlas_data[0]['additional_images'] = $row->{'gsx$additionalimagescommaseparated'}->{'$t'}; } } for ($x = 0; $x < count($atlas_data); $x++) { print_topic($x); } exit; function print_topic($topic_row) { global $atlas_data; echo "
\n"; echo "" . $atlas_data[$topic_row]["parent_node"] . " ›› " . $atlas_data[$topic_row]["level_1"] . " ›› " . $atlas_data[$topic_row]["level_5"] . "

\n"; echo "" . $atlas_data[$topic_row]["topic_name"] . "


\n"; if ($atlas_data[$topic_row]["image"] != '') { // Print out javascript code for each magnification effect ?>
" width="300" height="225" />



\n"; echo "Microscopic Features:\n"; if (!empty($atlas_data[$topic_row]["normal_values"])) echo "Normal % blood-PB, marrow-BM, lymphoid tissue-LN:\n"; // Show popup link [set by {row_id} within the Atlas Google Spreadsheet] if (preg_match_all('#\{(.*?)\}#', $atlas_data[$topic_row]["may_resemble"], $match, PREG_PATTERN_ORDER)) { for ($r = 0; $r < count($match[1]); $r++) { $patterns[] = '/' . $match[1][$r] . '/'; $replacements[] = ""; } $atlas_data[$topic_row]["may_resemble"] = preg_replace($patterns, $replacements, $atlas_data[$topic_row]["may_resemble"], 1); } $brackets = array("{", "}"); $atlas_data[$topic_row]["may_resemble"] = str_replace($brackets, "", $atlas_data[$topic_row]["may_resemble"]); echo "May Resemble:\n"; if (!empty($atlas_data[$topic_row]["differential_diagnoses"])) { echo "Differential Diagnoses:

\n"; echo "
" . str_replace("\n", "
", $atlas_data[$topic_row]["differential_diagnoses"]) . "

\n"; } if (!empty($atlas_data[$topic_row]["classic_immunophenotype"])) echo "Classic Immunophenotype:\n"; if (!empty($atlas_data[$topic_row]["cartoon"])) echo "Cartoon Image:



\n"; if (!empty($atlas_data[$topic_row]["misc"])) echo "Misc:\n"; echo "
\n"; } ?>