Today, We want to share with you strstr in php.In this post we will show you php string contains, hear for explode in php we will give you demo and example for implement.In this post, we will learn about How to String Replace in PHP Functions? with an example.
php string functions
In this tutorial we learn to all about strstr in php Examples like as a stristr in php, strpos in php, str_replace php, strchr in php, explode in php, php string contains, php string functions or many more.
The strstr() PHP function is help to get the first occurrence of a data string.
PHP strstr() Function
pass an integer as $search
Examples of strstr()
'; $quick_setting_new = "JAVA"; //case-sensitive var_dump(strstr($user_str_data, $quick_setting_new)); echo ''; var_dump(strstr($user_str_data, "WeLcOmE")); ?>
Example 2
'; $quick_setting_new = "E"; var_dump(strstr($user_str_data, $quick_setting_new, $before_search)); echo ''; $search3 = "nt"; echo strstr($user_str_data, $search3, $before_search); ?>
Example 3
'; var_dump(strstr("There are seven Websites(pakainfo, 4cgandhi,infinityknow) in the world.", 84)); echo ''; var_dump(strstr("There are seven Websites(pakainfo, 4cgandhi,infinityknow) in the world.", 79)); ?>
I hope you get an idea about strstr in php.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.