Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How do I find and replace text in PHP files?

New Here ,
Aug 14, 2010 Aug 14, 2010

How can I in CS3 make sitewide changes to the text in PHP pages without changing variable names etc that have the same name?

For example if I have an installation of a PHP forum and I want to change every instance of the word 'forum' to 'message board'...

If I used the 'inside tag' search with " as the tag, then if "" contained a variable called 'forum' it would also be changed and therefore corrupt the code....

Is there a simple way around this?

Thanks!

I'm using CS3 on Windows Vista.

TOPICS
Server side applications
489
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 15, 2010 Aug 15, 2010
LATEST

It looks like you're trying to find and replace source code, so you may be able to look at the various places that are looked at when finding and uncheck the ones that don't apply.

But, if it's all source code then that won't help.  One thing that may work is to expand the search option - for example if the work "forum" that you're wanting to change it preceded by another word, or character or something that sets it apart, then do you find on that. You can expand that search phrase as far out in either direction that you need to to make it different, if of course that is practical in your situation.

The only other way I can think of is to somehow create an exception rule, but I'm not sure if that's possible or how to do it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines