Ben DOĞRU dönmek gerektiğini biliyorum ama olmaz aşağıdaki işlevi var.
function myFunc($str,$array)
{
foreach($array as $k=>$v)
{
if(strtolower($v) == strtolower($str))
{
return TRUE;
}
}
return false;
}
Bu fonksiyon bir sınıf içinde kullanılan bir if ifadesi if($this->myFunc($something, $array)){
Ben DOĞRU karşılığında yukarıda bazı metin yankı bile yok ne yaparsam yapayım, bu doğru değil dönecektir; ve görüntülenir. Ben eksik bir şey için herhangi bir yardım, bu harika olurdu.
Sorry for not posting the codes.
My array prints the following
Array
(
[0] => -1
[1] => Platinum
[2] => 169
)
ve
$something = '-1';
I am trying to return true if -1 exists. The problem I don't think is if the value is in the array. The issue I have is to why it will not return as true, it will echo a value but it will not return anything. I tried using in_array vethe function still did not return as true, which is why I tried this method. Could this be an issue with my PHP version? I used strtolower because this function will be reused throughout the page to search for other values.
Teşekkürler