Skip to content

Instantly share code, notes, and snippets.

@quoidautre
Created September 19, 2012 09:09
Show Gist options
  • Select an option

  • Save quoidautre/3748607 to your computer and use it in GitHub Desktop.

Select an option

Save quoidautre/3748607 to your computer and use it in GitHub Desktop.
PHP : Supprimer tout ce qu'il y a apres un caractères précis
$carToDelimite = '@';
$string = 'this/is/a/string@text-to-delete';
$newString = substr($string, 0, strpos($string,$carToDelimite));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment