当我在做一个if
语句时,如果字符串是大写单词,它就不起作用,因为它会抓取我的搜索字符串的单词。
例子:
index.php?channel=test
<?php
$channel_query = $_GET['channel'];
$channel_query = $_GET['channel'];
if ($channel_query == "test") {
echo "Claimed";
} elseif($channel_query == "test1") {
echo "Claimed";
}
if(strtolower($channel_query) == strtolower($channel_query)){
} else
echo "N/A";
所以如果字符串是“Test”,它就不起作用,因为它是大写的。有任何想法吗?