note 124142 added to function.mb-stripos
| From: | FangTS_@php.net | Date: | Mon, 26 Aug 2019 20:27:40 +0000 |
| Subject: | note 124142 added to function.mb-stripos | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-212021@lists.php.net to get a copy of this message | ||
How works on examples mb_stripos:
First we will watch example on symbols(..?).
<?php
$text = "Look! It's a text! Wow!"; //simple text
$spaceIsHere = mb_stripos($text," "); //you can replace " " on something what
you need or want
$text2 = mb_substr($text,$spaceIsHere); //cutting text with $spaceIsHere
print ($text2);
/* Print will show that result:
" It's a text! Wow!"
Look. That " " wasn't cutted, because mb_substr don't write in var position
after " " - he write WHERE is " " in string. */
?>
Also it can work on words, sentences...
Here's one of examples:
<?php
$text = "Look! It's a text! Wow!"; //familiar text, right?)
$afterNeededWord = mb_stripos($text,"text!"); //you can replace "text!" on
something else what you need
$text3 = mb_substr($text, $afterNeededWord); //cutting string (it is string? im stupid in that
question xD)
print ($text3);
/* Print will show that result:
"text! Wow!"
Explaining the same. */
?>
I hope it was useful with my "good" English skills. ;D
Have a nice day, coder.
----
Server IP: 208.43.231.9
Probable Submitter: 119.81.81.244 (proxied: 46.53.254.5)
----
Manual Page -- http://php.net/manual/en/function.mb-stripos.php
Edit -- https://master.php.net/note/edit/124142
Del: integrated -- https://master.php.net/note/delete/124142/integrated
Del: useless -- https://master.php.net/note/delete/124142/useless
Del: bad code -- https://master.php.net/note/delete/124142/bad+code
Del: spam -- https://master.php.net/note/delete/124142/spam
Del: non-english -- https://master.php.net/note/delete/124142/non-english
Del: in docs -- https://master.php.net/note/delete/124142/in+docs
Del: other reasons-- https://master.php.net/note/delete/124142
Reject -- https://master.php.net/note/reject/124142
Search -- https://master.php.net/manage/user-notes.php