Using strrpos () with PHP
Possible duplicate:
How to make strpos case insensitive
I check to see if the string contains the text "People who love". Well the code works great! Moreover, it is case sensitive. What can I do to prevent this?
If the string "people who like to run" it returns false If the string "People who like to run" it returns true
I want this to be not case sensitive.
code:
<?php
$string = "People who like to run";
if (strrpos($string, 'People who like') === false) {
echo "False";
}
else {
echo "True";
}
+3
source to share
3 answers