W3Schools.com

PHP strripos() Function


PHP String Reference Complete PHP String Reference

Definition and Usage

The strripos() function finds the position of the last occurrence of a string inside another string.

This function returns the position on success, otherwise it returns FALSE.

Syntax

strripos(string,find,start)

Parameter Description
string Required. Specifies the string to search
find Required. Specifies the string to find
start Optional. Specifies where to begin the search


Tips and Notes

Note: The strripos() function is case-insensitive.


Example

<?php
echo strripos("Hello world!","WO");
?>

The output of the code above will be:

6


PHP String Reference Complete PHP String Reference
WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Best Hosting Coupons
UK Reseller Hosting
Cloud Hosting
Top Web Hosting
$7.95/mo SEO Hosting
Premium Website Design
WEB BUILDING
Download XML Editor
FREE Website BUILDER
Free Website Templates Free CSS Templates
Make Your Own Website
W3SCHOOLS EXAMS
Get Certified in:
HTML, CSS, JavaScript, XML, PHP, and ASP
W3SCHOOLS BOOKS
New Books:
HTML, CSS
JavaScript, and Ajax
STATISTICS
Browser Statistics
Browser OS
Browser Display
SHARE THIS PAGE