If a word is found, display something

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
apollovega
Forum Newbie
Posts: 12
Joined: Thu Feb 19, 2004 3:34 pm

If a word is found, display something

Post by apollovega »

Okay, my question is pretty simple (specially to you advanced php'ers :) )
I was wondering if it were possible (and if so, how) you could achieve this... (bear with me as I'm pretty new to php hehe)

Basically, what I want this lil script to do is if the word "Nadia" (or whatever) is found at all on the entire page, to replace that word with a picture instead.. Think of it this way, the Emoticons on the side. Whenever someone types :-) they get a smily instead. That's exactly what I want to do. Any ideas as to how this is done? Thanks!
P.s, if you want you could just point me into the right direction and I could try my hand at figuring it out. Any help would be muchly appreciated.. Thanks!
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

[php_man]str_replace[/php_man]()

Mac
Post Reply