I have wasted two days trying to find a solution to my problem and thought I could use some help from you PHP gurus.
I want to search for a string occurence within another string and know this can be easily done with eregi() but what I want is more problematic.
Here's what I did:
$lookingforthis="STRING-836161F5";
$inthis="STRING";
if(!eregi($lookingforthis, $inthis)) { echo "Not found";}
This doesn't work for me since eregi() is unable to find "STRING" in "STRING-836161F5". I was wondering if there's some other specialized function for what I want.
Now some background: What I do is I get a user's computer name in the $lookingforthis format and want to compare it against a list of usernames; The computer name always contains a dash so eregi() won't work for me
Your help is highly appreciated!!!