Return to Snippet

Revision: 22940
at January 26, 2010 07:44 by olive


Updated Code
$result_string = substr($string1,0,strpos($string1,$needle));

Revision: 22939
at January 26, 2010 07:43 by olive


Initial Code
$result_string = substr("$string1",0,strpos($string1,$needle));

Initial URL


Initial Description
To get all the text before the first occurence (excluding the needle)

Initial Title
Texte avant needle

Initial Tags


Initial Language
PHP