Reply to Re: How to convert ascii to text

Your name:

Reply:


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 ( "/\'+/" , '&#39' , $entry);
>$entry = preg_replace ( "/\,+/" , '&#44' , $entry);

Are you aware that this will replace a string of quotes ('''''') or commas
(,,,,,,,) with a single &#39 or &#44? 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.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация