PHP sprintf escaping %
It is very easy.
Put another %
in front of the original %
to escape it.
For example,
$num=23;
printf("%%d of 23 = %d",$num);
Output:
%d of 23 = 23
Escape it with another %
:
$stringWithVariables = 'About to deduct 50%% of %s %s from your Top-Up account.';