You are here: Re: nonstandard symbols: function to replace? « PHP Programming Language « IT news, forums, messages
Re: nonstandard symbols: function to replace?

Posted by Toby Inkster on 11/14/05 22:19

guitarromantic wrote:

> Because I'd have to manually go through each one and process it through
> the system..?

Please quote the post you're replying to so that people know what you're
talking about.

No need to do it manually! Say you have a function "fixsymbols()" that can
fix the symbols, simply create a script like this:

$r = mysql_query("SELECT articleid, content FROM articles;");
while ($a = mysql_fetch_array($r))
{
$id = $a[0];
$content = addslashes(fixsymbols($a[1]));
$q = "UPDATE articles SET content='$content' WHERE articleid='$id';";
mysql_query($q);
}

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 

Navigation:

[Reply to this 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

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