Location: PHPKode > projects > gframe > gframe/functions.php

// Nasty Function !
// It is not that easy, because array_search looks up the pattern in every element.
// In case I just want to search in the first element of every entry.
// Doing a little work around

function find_in_array($array, $pattern)
	foreach($array as $array_split)
	 if($pattern == current($array_split))
	 	$array_result[] = $array_split;
	return $array_result;

function create_info_page($message, $template_path)
		$smarty = new Smarty;
		$smarty->assign('message', $message);

Return current item: gframe