Skip to content

Instantly share code, notes, and snippets.

@gcollazo
Created January 12, 2010 19:35
Show Gist options
  • Select an option

  • Save gcollazo/275525 to your computer and use it in GitHub Desktop.

Select an option

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