title: Warning: trim() expects parameter 1 to be string, array given in php script
body: <p>i have php script, when i executed this code, i got warning </p>
  
  <blockquote>
    <p>Warning: trim() expects parameter 1 to be string, array given in home/public_html</p>
  </blockquote>
  
  <p>i've added antixss function for security vulnerability , like this code below. how do i resolve this warning?</p>
  
  <pre><code>&lt;?php
  $email_to = ""; 
  $email_subject = ""; 
  $success = ""; 
  
  function antixss($value)
  {
      $xss = htmlspecialchars(trim($value));
      return $xss;
  }
  
  
  if(!isset($_POST['First_Name']) ||
     !isset($_POST['Last_Name']) 
      {
      died('Sorry, there appears to be a problem.');      
  }
  $first_name =antixss($_POST['First_Name']); 
  $last_name = antixss($_POST['Last_Name']);    
  </code></pre>
  
  <p>how do i resolve this warning? thanks</p>