我想要以下输出:-
即将从您的充值账户中扣除 27.59 欧元的 50%。
当我做这样的事情时:-
$variablesArray[0] = '€';
$variablesArray[1] = 27.59;
$stringWithVariables = 'About to deduct 50% of %s %s from your Top-Up account.';
echo vsprintf($stringWithVariables, $variablesArray);
但这给了我这个错误vsprintf() [function.vsprintf]: Too few arguments in ...
因为它考虑到%
in 50%
也用于更换。我该如何逃避它?
与另一个一起逃脱%
:
$stringWithVariables = 'About to deduct 50%% of %s %s from your Top-Up account.';
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)