Created
November 8, 2011 10:51
-
-
Save hamadu/1347487 to your computer and use it in GitHub Desktop.
何故作った
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function uni_html_link($name, $module = '', $action = '', $param = array(), $class = ''){ | |
$str = $module . '/' . $action; | |
if (count($param) > 0) { | |
$str .= '?'; | |
foreach ($param as $key => $value) { | |
$str .= $key . '=' . $value . '&'; | |
} | |
$str = substr($str, 0, -1); | |
} | |
$url = url_for($str); | |
return sprintf('<a class="%s" href="%s">%s</a>', $class, $url, $name); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment