Wednesday, July 10, 2013

Simple tip to clear the input if  input must contain only numbers and letters:

<?php
$output = preg_replace('/[^A-Za-z0-9-]/', '', $input);
?>

No comments:

Post a Comment