Skip to content

Instantly share code, notes, and snippets.

@MilkZoft
Created January 18, 2012 03:58
Show Gist options
  • Select an option

  • Save MilkZoft/1630840 to your computer and use it in GitHub Desktop.

Select an option

Save MilkZoft/1630840 to your computer and use it in GitHub Desktop.
codejobs - Compress a string - PHP
<?php
function compress($string) {
$string = str_replace(array("\r\n", "\r", "\n", "\t", " ", " ", " "), "", $string);
return $string;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment