title: how to target array of post to make one line of code instead of multiple?
body: <p>As you can see I would need to create multiple lines for each item in the form, How can I make one line(to target the entire post array I guess is what I need to do?) to include the entire $_POST my current method is below .</p>
  <pre><code>$name = trim(preg_replace('/ +/', ' ', preg_replace('/[^A-Za-z0-9 ]/', ' ',    urldecode(html_entity_decode(strip_tags($_POST['name']))))));
  $email = trim(preg_replace('/ +/', ' ', preg_replace('/[^A-Za-z0-9 ]/', ' ', urldecode(html_entity_decode(strip_tags($_POST['email']))))));
  $phone = trim(preg_replace('/ +/', ' ', preg_replace('/[^A-Za-z0-9 ]/', ' ', urldecode(html_entity_decode(strip_tags($_POST['phone']))))));
  $make = trim(preg_replace('/ +/', ' ', preg_replace('/[^A-Za-z0-9 ]/', ' ', urldecode(html_entity_decode(strip_tags($_POST['make']))))));
  $model = trim(preg_replace('/ +/', ' ', preg_replace('/[^A-Za-z0-9 ]/', ' ', urldecode(html_entity_decode(strip_tags($_POST['model']))))));
  $year = trim(preg_replace('/ +/', ' ', preg_replace('/[^A-Za-z0-9 ]/', ' ', urldecode(html_entity_decode(strip_tags($_POST['year']))))));
  $vin = trim(preg_replace('/ +/', ' ', preg_replace('/[^A-Za-z0-9 ]/', ' ', urldecode(html_entity_decode(strip_tags($_POST['vin']))))));
  $insurance_company = trim(preg_replace('/ +/', ' ', preg_replace('/[^A-Za-z0-9 ]/', ' ', urldecode(html_entity_decode(strip_tags($_POST['insurance_company']))))));
  $message = trim(preg_replace('/ +/', ' ', preg_replace('/[^A-Za-z0-9 ]/', ' ', urldecode(html_entity_decode(strip_tags($_POST['message']))))));
  $IP = $_SERVER['REMOTE_HOST'] ?: gethostbyaddr($_SERVER['REMOTE_ADDR']);
  
  
  
   I use this to make  all the fields into one variable 
  $combineall = $name . $email . $phone . $make . $model . $year . $vin . $insurance_company . $message . $message . $IP ;
  </code></pre>
  <p>and</p>
  <pre><code>if (isset($_POST['submit'])){
  Once the button is pressed cleans the all the fields in the post array. 
  $combineall = trim(preg_replace('/ +/', ' ', preg_replace('/[^A-Za-z0-9 ]/', ' ', urldecode(html_entity_decode(strip_tags($combineall))))));
  </code></pre>
  <p>something like this is what im looking for but this does not work any idea how to fix it???</p>
  <pre><code>$_POST = trim(preg_replace('/ +/', ' ', preg_replace('/[^A-Za-z0-9 ]/', ' ', urldecode(html_entity_decode(strip_tags($_POST))))));
  </code></pre>