For example I have this :
$string = 'PHP is a server side web programming language , PHP is amazing , I love PHP';
$array = array('html','css','javascript','ajax','html5','css3','jquery','PHP');
foreach($array as $ar){
//Check if one of the $array values exists in the $string
}
I want to search from the end of the $string only , so if the $array value is not at the end then nothing would happen as it's not exist , The PHP could be any of the other values in the $array so I don't know the length the value should be found at , I mean the word could be repeated and with different length.
i.e : $string = 'html .... , html is fantastic , I love html';
,
now the length of the word is bigger , and it could be bigger than that.
How to find the last one only what ever the length of the word is ?