Here's a quick question
I need to duplicate values in a sprintf function
sprintf("%s %s %s",$arg1,$arg1,$arg2);
How can I only pass $arg1 once? Can't seem to find the answer on php.net
Thanks
Andrew
Use the indexed format %1$s
instead:
sprintf("%1$s %1$s %2$s", $arg1, $arg2)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With