Re: Replacing A Word in HTML page

From: Date: Sun, 04 Feb 2001 18:54:15 +0000
Subject: Re: Replacing A Word in HTML page
Groups: php.general 
Request: Send a blank email to php-general+get-38132@lists.php.net to get a copy of this message
"phpLover" <tabarry@email.com> wrote: > Thanks for your answerm but what does eregi_replace() do? Short answer is to see http://www.php.net/manual/en/function.eregi-replace.php. Usage examples can be found right on php.net. See longer answer below. Previously "phpLover" <tabarry@email.com> wrote: > I want to read an HTML page from another site and replace certain > characters > with capital letters and show them in another dynamically generated web > page on my site. I should have said use ereg_replace(). It matches text using regular expressions (regular expressions allow for complex matching) in a case-sensitive manner. Depending on the specifics of what you're attempting it may be of use. You could use it to replace certain characters within a specific part of the HTML source page (but ignore the same characters within other parts of the page) with capital letters (like you described). If you simply want to replace all matches within the page str_replace() is a better choice. Regular expressions are a more difficult concept to master than a lot of other concepts within PHP so you may want to look at some tutorials or books on the subject. -- Steve Werby COO 24-7 Computer Services, LLC Tel: 804.817.2470 http://www.247computing.com/

« previous php.general (#38132) next »