Texte avant needle


/ Published in: PHP
Save to your folder(s)

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


Copy this code and paste it in your HTML
  1. $result_string = substr($string1,0,strpos($string1,$needle));

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.