Created
April 26, 2009 16:23
-
-
Save oppara/102085 to your computer and use it in GitHub Desktop.
php: sprintf use array
This file contains hidden or 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
/** | |
* sprintf use array | |
* | |
* @see http://jp.php.net/manual/ja/function.printf.php | |
* @param string $format | |
* @param array $arr | |
* @access public | |
* @return string | |
*/ | |
function sprintf_array( $format, $arr ) { | |
return call_user_func_array( 'sprintf', array_merge( (array) $format, $arr ) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment