Posted By

olive on 01/26/10


Tagged

String


Versions (?)

Texte avant needle


 / Published in: PHP
 

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

  1. $result_string = substr($string1,0,strpos($string1,$needle));

Report this snippet  

You need to login to post a comment.