I am curious why is the "contains" forumula so complex in PHP?
I am learning PHP coming from a not very used language called Lasso. PHP and Lasso are quite similar.
One thing Lasso has that's really nice is the contains string function >>
if($myVar >> 'x') // this is a contains statement
Is there an easier way than:
if(strpos($a, 'are') !== false)
It almost seems like a double negative. Why not == True? This is probably the most confusing thing I have come across. I hope someone can shed some light!
EDIT: I think the answer to my question is there is no other shortcut code for contains. Thanks for everyone's help.