PHP HTML Entities
<p>I want to display on screen data send by the user, 
remembering it can contain dangerous code, it is the best to clean this data with html entities.</p>

<p>Is there a better way to do html entities, besides this:</p>

<pre><code>$name = clean($name, 40);
$email = clean($email, 40);
$comment = clean($comment, 40);
</code></pre>

<p>and this:</p>

<pre><code>$data = array("name", "email," "comment") 

function confHtmlEnt($data)
{
return htmlentities($data, ENT_QUOTES, 'UTF-8');
}

$cleanPost = array_map('confHtmlEnt', $_POST);
</code></pre>

<p>if so, how, and how does my wannabe structure
for html entities look?</p>

<p>Thank you for not flaming the newb :-).</p>
