PDA

View Full Version : Mod to replace question marks with forward slahes


zboca
02-11-2002, 02:41/02:41AM
Hi,

I'm looking for a mod that replaces question marks with / slashes for PHP. If anyone has any related links, I would really appreciate it.

(Mods-- sorry if I'm in the wrong place)

Thanks,

Zak

[Moved to PHP forum - Jill]

Blue
02-11-2002, 12:06/12:06PM
Check here (http://www.zend.com/zend/spotlight/searchengine.php), or here (http://www.phpfreaks.com/tutorials/23/0.php), and let me know if this is what you're after.

JuniorHarris
02-11-2002, 18:09/06:09PM
Those looks like some good links Blue.

Also maybe check out PHP Builder (http://www.phpbuilder.com/columns/tim20000526.php3).

Kal
04-11-2002, 23:59/11:59PM
Here's a great tutorial (http://www.promotionbase.com/article/485) that shows how to do exactly what you ask.

martekbiz
28-11-2002, 11:40/11:40AM
Hmm..

can you elaborate further?

If you simply want to replace one character/string with another you can just str_replace()


$old_text = "www.yahoo.com?ihelpyou";

$new_text = str_replace("?", "/", $old_text);

$new_text will now be www.yahoo.com/ihelpyou

Can you also look at preg_replace for MORE control over search and replace patterns.

Sorry if I didn't provide and useful info.

Aaron