Hello all. I use the following code to check if a string is the session username at the moment.
if($_SESSION['username'] == $home || $_SESSION['username'] == $away)
I am looking to change that to see if the string includes the session username, not specifically IS the username.
Is there a way to do this? Thankyou
Edit :
Say the string is "Username1 and Username2", I will "Username1" to be found.
I have done the following:
if( ( strpos($home, $_SESSION['username']) !== false) || ( strpos($away, $_SESSION['username']) !== false) )
That doesnt appear to have worked though!