I am trying to pass multiple arguments to a custom method which contains a sprintf() method. The arguments I am passing will be used in the sprintf() method. Is there a way to do this? I tried the code below but get "too few arguments".
<?php
function myMethod($text, $args)
{
echo sprintf($text, $args);
}
myMethod('"%s" is "%s" method', 'This', 'my');
?>