$section) { foreach ($section as $name => $val) { //echo("

$name

"); if(in_array($name, $EXIF_properties) && $name != "0") { //echo("

$name: $val

"); if(empty($val)) $val = "(not available)"; else if($name == "DateTimeOriginal") { $val = date("F j, Y, g:i a", strtotime($val)); } switch ($name) { case "FileName": array_push($properties, "00Name: $val"); break; case "ApertureFNumber": array_push($properties, "04Aperture: $val"); break; case "Make": array_push($properties, "01Make: $val"); break; case "Model": array_push($properties, "01Model: $val"); break; case "ExposureTime": array_push($properties, "08Exposure Time: $val"); break; case "FNumber": array_push($properties, "05F Stop: $val"); break; case "ExposureProgram": array_push($properties, "08Exposure Program: $val"); break; case "DateTimeOriginal": array_push($properties, "03Date Taken: $val"); break; case "CompressedBitsPerPixel": array_push($properties, "13Compression: $val"); break; case "ExposureBiasValue": array_push($properties, "10Exposure Bias: $val"); break; case "MeteringMode": array_push($properties, "07Metering Mode: $val"); break; case "LightSource": array_push($properties, "12Light Source: $val"); break; case "Flash": array_push($properties, "11Flash: $val"); break; case "FocalLength": array_push($properties, "06Focal Length: $val"); break; } } } } } natcasesort($properties); $html = ""; $table_header = ""; $tr_opening = ""; $table_footer = "
"; $tr_middle = ": "; $tr_closing = "
"; $html = $table_header; $size = $tr_opening . "Size" . $tr_middle . $ajax_width_desc . " x " . $ajax_height_desc . " px (". $ajax_size_desc . ")" . $tr_closing; if(count($properties) == 0) { $html .= "Sorry, photo properties are not available. Either the photo contains no EXIF data or PHP\'s EXIF extensions are not installed."; } else { foreach ($properties as $prop) { $value = substr($prop, 2); print($prop . "
"); $html .= $tr_opening . str_replace(": ", $tr_middle, $value) . $tr_closing; if(strpos($prop, "00Name:") !== FALSE) $html .= $size; } } $html .= $table_footer; //print($html); ?>