[HELP] Percent sign replacement.
[email protected] ("Alexander Schreijnders") Sat, 10 Jan 2004 01:30:47 +0100
| Newsgroups | php.lang |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I have written the following code to parse the incoming text from a
<textarea> so that PHP chars like " or \ are replaced with their respective
alt-codes.
$strBodyText1 = $_POST['message'];
$strBodyText2 = str_replace(array("\'", '\"', '\\', "%%"), array('\'',
'"', '\', '%'), $strBodyText1);
printf($strBodyText);
This code work well until a percent sign (%) comes into action. Somehow it's
not recognised by the code and I get a huge printf() error.
The error is as followed:
Warning: printf() [function.printf]: Too few arguments in
/home/users/g/i/gimmic/www/brugadvies/rtb/function.php on line 91
I have searched for a sollution, but couldn't find one. Any idea how this
issue can be resolved?
Thanks in advance for your effort!
Cheers,
Alexander