Jump to content

[SOLVED] Compare String


N-Bomb(Nerd)

Recommended Posts

Hi, I'm asking my user for input but when I do an "if" statement to see if their input matches something already that's in an array but I can't get it to use the array properly. It will only check against "Word1", what can I do different to make it use the whole array of words?

 

$Wap[0] = "Word1";
$Wap[1] = "Word2";

if (strtolower(Input($Value)) == strtolower($Wap[0]) {
echo 'word already exists';
}

Link to comment
https://forums.phpfreaks.com/topic/133967-solved-compare-string/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.