I use %s as placeholders in a text file and something like
To read a line.
So $tc will replace %s in $line.
But if line contains "charge a 2% surcharge" then $tc also replaces the '%'.
How do I get round this and leave '%' untouched and only replace '%s'?
Tried backslash, that doesn't work
Code:
$line = sprintf(fgets($fp),$tc,$tc);
So $tc will replace %s in $line.
But if line contains "charge a 2% surcharge" then $tc also replaces the '%'.
How do I get round this and leave '%' untouched and only replace '%s'?
Tried backslash, that doesn't work
Comment