Reply to preg_match/replace to fix a search query

Your name:

Reply:


Posted by fienen@gmail.com on 03/16/07 16:19

I am working on a script to handle a search query. In some instances,
the query could come through as "isbn:%20#############" (where %20 is
an encoded space and the colon is optional). Basically I want to
strip off the ISBN portion and leave just the numbers if that is the
case.

Orignally I was trying
$value = $_GET["query"];
if (preg_match("isbn:?%20", $value))
{
$isbn = preg_replace("isbn:?%20", "", $value)
}
else
{
$isbn = $value
}

Doesn't seem to work though. Any thoughts?

[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

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