";
	print_r($var);
	echo "
"; exit; } function get_gifimage_size($filename) { if (function_exists('gd_info')) { $info = gd_info(); if (isset($info['GIF Read Support']) && $info['GIF Read Support']) { $img = @imagecreatefromgif($filename); if ($img) { $height = imagesy($img); $width = imagesx($img); imagedestroy($img); return array($width, $height); } } } return array(0, 0); } function jspath() { return "js/compiled"; } function div($a, $b) { return ($a - ($a % $b)) / $b; } /** * Flatten array recursively. * * For example if input array is: * * $input = array( * 'first' => 1, * 'second' => array( * 'f' => 'value', * 's' => null, * 't' => array( * 'one', 'two', 'three' * ), * 'f' => 4 * ), * 'third' => false, * ); * * the output array will be: * * $output = array( * 'first' => 1, * 'second.f' => 'value', * 'second.s' => null, * 'second.t.0' => 'one', * 'second.t.1' => 'two', * 'second.t.2' => 'three' * 'second.f' => 4, * 'third' => false * ); * * * @param array $arr Array to flatten * @return array */ function array_flatten_recursive($arr) { $result = array(); foreach($arr as $key => $value) { if (is_array($value)) { // Flatten nested arrays $value = array_flatten_recursive($value); foreach($value as $inner_key => $inner_value) { $result[$key.".".$inner_key] = $inner_value; } } else { // Leave scalar values 'as is' $result[$key] = $value; } } return $result; } ?>