Is there a way in PHP to name my specifiers like in Python?
I want this in PHP:
$foo = array(\'name\' => 24); printf(\"%(name)d\", $foo);
You can do it with sprintf by numbering the parameters, like so:
sprintf
echo sprintf('hello, %2$s. What is your %1$s', 'age', 'Jesse');
Outputs the following string:
hello, Jesse. What is your age