Skip to content

Instantly share code, notes, and snippets.

@gcollazo
Created January 12, 2010 19:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gcollazo/275525 to your computer and use it in GitHub Desktop.
Save gcollazo/275525 to your computer and use it in GitHub Desktop.
<?php
$str = mysql_real_escape_string('(777) 777-7777');
echo str_replace('-', '', str_replace(' ', '', str_replace(')', '', str_replace('(', '', $str))));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment