array_filter hata

0 Cevap php

Ben filter_array burada bir sorun var.

Aşağıda benim kodudur:

$array = array("0","0","1");
function returnzero($d){

    if($d=='0'){
       return $d;
    }
}

$all_zeros = array_filter($array, "returnzero");
echo count($all_zeros);

I would like to filter out all values that none other than zero. Above is my code. However, the count result returned is always 0.

Benim hata nedir biliyor olabilir?

Teşekkürler.

0 Cevap