how can I do a string check inside a string in php?

theD

New Member
Does anyone know how can I do a string check inside a string? for example:\[code\]$variable = "Pensioner (other)";\[/code\]If I want to check whether $variable contain the word 'Pensioner', how can I do it in PHP? I have tried the following code in php, but it's always return me false :( \[code\]$pos = strripos($variable,"Pensioner");if($pos) echo "found one";else echo "not found";\[/code\]
 
Back
Top