LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: Alexander Schreijnders Date: Fri Jan 9 17:30:47 2004 Subject: [HELP] Percent sign replacement.
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
| Navigate in group php.lang at sever news.php.net | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by PHP Developer
Powered By PHP Consultants |