|
Posted by Tim Roberts on 12/16/06 07:36
veg_all@yahoo.com wrote:
>
>I replace some user input with their ascii equivalent so they display
>on the webpage properly:
>
>$entry = preg_replace ( "/\'+/" , ''' , $entry);
>$entry = preg_replace ( "/\,+/" , ',' , $entry);
Are you aware that this will replace a string of quotes ('''''') or commas
(,,,,,,,) with a single ' or ,? I'm pretty sure you don't want the
plus signs in there.
I assume this wasn't cut-and-pasted from your code, because the entities
must have trailing semicolons: '
Also, there is no reason to quote a comma. What led you to do that?
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
Navigation:
[Reply to this message]
|