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:[EMAIL PROTECTED]]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to