コード例 #1
0
ファイル: functions.php プロジェクト: nomad-mystic/CIS195PHP
function find_country($user_input, $array_data)
{
    for ($i = 0; $i < NUMBER_COUNTRIES; $i++) {
        if ($array_data[$i][COUNTRY_FIELD] === $user_input) {
            $current_country = $array_data[$i];
            $json_data = map_data($current_country);
        }
    }
    return $json_data;
}
コード例 #2
0
function map_data($object, $data)
{
    foreach ($object as $item => $structure) {
        if (is_array($structure) && count($structure) == 2 && strpos($structure[0], "_fw_") === 0) {
            $data_structure[$item] = $structure[0]($structure[1], $data);
        } else {
            if (is_string($structure)) {
                $data_structure[$item] = $structure;
            } else {
                if (is_array($structure)) {
                    $data_structure[$item] = map_data($structure, $data);
                }
            }
        }
    }
    return $data_structure;
}
コード例 #3
0
					$arrline[$surah_no."-".$ayah_no]=$arrline[$surah_no."-".$ayah_no]+1;
					 ?>
				   <script>
				   n=n+1; 
				   linearray[m]=n;
				   
				   </script>
				   <?php
					$number++;
				}
			

				  
						
	     }
	   $arrVal = map_data($ayah_no,$x_start,$x_end,$y_start,$y_end);
	   
	   $left = $arrVal['left'];
	   $top  = $arrVal['top'];
	   $right = $arrVal['right'];
	   $bottom = $arrVal['bottom'];

	   
	   
	   $url_theme_count = 0;

		/*for($i=$ayah_no;$i>=1;$i--)
		{
		
			$view_url= views_get_view('ayah_theme');
			$view_url->set_display('default');