View Single Post
  #6 (permalink)  
Old April 27th, 2004, 05:55 PM
nikolai nikolai is offline
Friend of Wrox
Points: 2,570, Level: 21
Points: 2,570, Level: 21 Points: 2,570, Level: 21 Points: 2,570, Level: 21
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: San Diego, CA, USA
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Using htmlentities() is a cleaner solution to using str_replace() on all left brackets.

echo "<textarea>" . htmlentities($data['code'] . "</textarea>\n";

This prevents the text area from being incorrectly terminated when the data you're printing in the textarea containst the text "</textarea>".



Take care,

Nik
http://www.bigaction.org/
Reply With Quote