Teen Programmers Unite  
 

 

Return to forum top

Perl and PHP

Posted by grandsnafu [send private reply] at November 27, 2001, 11:33:19 PM

I've got a web app (in Perl) that strips most HTML from a message in an input box, stores it on the server, and then retrieves it later for the user. I was wondering what the best way to do the whole "strip HTML" thing would be in PHP. Any one know?

Posted by buzgub [send private reply] at November 29, 2001, 12:57:29 AM

PHP does have a regex engine that you should be able to use, or you could handle it yourself with the substr() function, which is just like the one in perl. Those are the options I know of, but I'm still very much learning php.

Posted by gian [send private reply] at December 02, 2001, 03:44:29 AM

striptags() or some such.... check the PHP manual under "string functions".

Posted by grandsnafu [send private reply] at December 13, 2001, 12:18:51 AM

(delayed reaction)

Yep, that's the one! Thanks.

You must be logged in to post messages and see which you have already read.

Log on
Username:
Password:
Save for later automatic logon

Register as a new user
 
Copyright TPU 2002. See the Credits and About TPU for more information.