Current Location: Home> Function Categories> stripos

stripos

Find the location where the string first appears (case insensitive)
Name:stripos
Category:String
Programming Language:php
One-line Description:Returns where the string first appears in another string (case insensitive).

Example

Find the first occurrence of "php" in a string:

 <span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token keyword">echo</span> <span class="token function">stripos</span> <span class="token punctuation">(</span> <span class="token string double-quoted-string">"You love php, I love php too!"</span> <span class="token punctuation">,</span> <span class="token string double-quoted-string">"PHP"</span> <span class="token punctuation">)</span> <span class="token punctuation">;</span>
<span class="token delimiter important">?></span></span>

Try it yourself

Similar Functions
Popular Articles