我想要以下输出:-
即将从您的充值账户中扣除 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 ...,因为它认为%in50%也可以替换。我该如何逃脱它?
vsprintf() [function.vsprintf]: Too few arguments in ...
%
50%
用另一个逃避它%:
$stringWithVariables = 'About to deduct 50%% of %s %s from your Top-Up account.';