Forum Moderators: coopster
The problem is we have different user IDs. Some of them are 7 characters and some are 8. This is how I do a check for them. (assume $arrayExplode[43] is the username)
//if it is the 2b guy then we grab 7 characters otherwise we grab 8 for the user id
if($arrayExplode[43] == "S21762B~PER"){
$userName = substr($arrayExplode[43], 0, 7);
echo("if");
}
elseif((trim($arrayExplode[43]) == "S21762FJG~PER") ¦¦ (trim($arrayExplode[43]) == "S21762FUZ~PER") ¦¦
(trim($arrayExplode[43]) == "S21762FFW~PER") ¦¦ (trim($arrayExplode[43]) == "S21762DQR~PER")){
$userName = substr($arrayExplode[43], 0, 8);
}//else
else{
echo("The username $arrayExplode[43] was not recognized.");
die();
}
ok so when $arrayExplode[43] is S21762B~PER the program works fine. However, if it is any of the user ids in the else if it sees them as not matching. I did a var dump on $arrayExplode[43] and can clearly see that it is S2176FJG~PER no white spaces or returns. Anyone know why I am getting a false on this. Thanks
[1][edited by: andrewsmd at 9:11 pm (utc) on July 31, 2008]