views:

139

answers:

2

Hi

How can I test if there is a string only once in a site? I use the WebTestCase from simpletest.

+1  A: 

If you have a database of all page names and you know the string you are looking for you could walk through the database and read each page, then searching each page for the string.

Josh Curren
no database it's a kind of form processing and I need to check if the string is not more then one times send.
gustavgans
A: 

hey please help me..i m newbie in php..

i have to replace the string with another string .. how can i do that...

eg.

input : My Name is Amitesh Purwar.

result: My Name is Hello Boy.

i have tried using preg_replace. but the pattern is varying rather than constant.

suggest me the technique.

Thanks in advance.