RE: [PHP] How do I do to update part of a string?

From: Date: Tue, 16 Jan 2001 02:45:21 +0000
Subject: RE: [PHP] How do I do to update part of a string?
Groups: php.general 
Request: Send a blank email to php-general+get-34740@lists.php.net to get a copy of this message
if it is a simple del then use str_replace... however if there's a more complicated logic, then you will need an ereg_replace or preg_replace... will be heavier but more capable.. I use it on certain 10.000 words articles. And I replace not a big chunk of code but some few words in a big chunk. The best way to do it is on preparation of text, like when you are about to insert the article in the database, then if it is not a user to do you can wait some time, right? However if someone comes to read your site and you prepare the article for him replacing there thousands of things, then you have to care of your processing time. typically ereg()s are quite slow,.... Cheers, Maxim Maletsky -----Original Message----- From: Romulo Roberto Pereira [mailto:php@diffdev.com] Sent: Tuesday, January 16, 2001 11:39 AM To: php-general Subject: [PHP] How do I do to update part of a string? I have a big string. How can I do to find some text inside and modify that text? I was thinking about ereg_replace(). But it is capable to handle big chuncks of text? If yes, it will notbe too heavy for theserver? Any other ideas? Thank you, Rom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#34740) next »