[Newbie] Questions...

From: Date: Thu, 08 May 2003 23:20:45 +0000
Subject: [Newbie] Questions...
Groups: php.general 
Request: Send a blank email to php-general+get-146932@lists.php.net to get a copy of this message
Hey, I've read the manual entry on preg_replace() and i've used google for help but i'm still confused as it all looks horribly complicated.. What i want to do is when a user submits a quote for example "<@TheHeadSage> lol" i want to remove the <>'s and replace them with &lt; and &gt; so they display properly on a webpage. How would i go about this using preg_replace() or another function like it? Also, my second question which ties into the whole quote thing, how do i select random rows from a MySQL database? So i can get a random quote every time the user reloads the page or a new visitor arrives. Thanks again, Daniel "TheHeadSage" Spain

« previous php.general (#146932) next »