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
/** | |
* Formats a string using an associative array. | |
* Example: | |
* echo nsprintf(":name :surname is :age", array('name' => 'John', 'age' => '29', 'surname' => 'Doe')); | |
* | |
* @param string $format A formatted string with named template fields | |
* @param array $args An associative array of values to place in the formatted string. | |
* @return string A formatted string | |
*/ | |
function nsprintf($format, $args) |