php - "sprintf" sentence give me bad output -
i have line:
$lang = 'estimado %s, tiene un saldo disponible de <strong>%s</strong> usd para realizar llamadas';
then intended use sprintf function output right sentence, code:
$username = "somename"; $account = "13.1288"; sprintf($lang, $username, number_format($account, 2));
but output just:
somename
what wrong?
sprintf doesn't print text, returns string.
you meant use printf instead, or can echo results of sprintf statement.
Comments
Post a Comment