ve ya operatör php soru?

0 Cevap php

hey guys, i'm confused with this:

forceAnim: <?php echo (is_singular() || $iphone) ? 0 : 1; ?>

i have this forceAnim parameter in one function that could be either 0 or 1. is_singular means that a specific type of page is shown $iphone means it's viewed on the iphone.

i iphone izlendi ve ek i is_singular true döndürür forceAnim 0 olmak istiyorsanız eğer forceAnmi DAİMA 0 olmak istiyorum.

hile ne? Şu anda bir tekil sayfa iphone forceAnim görülüyor ise 1'dir.

Saygılarımızla mat

edit:

echo $iphone; //returns 1 only if on iphone
echo is_singular(); //returns 1 only if i'm on a singular page

both vars return 1 but just if they are true. so if i'm on the iphone $iphone returns 1, but if i'm not on the iphone $iphone doesn't return anythin (not 0) the same applies to is_singular()!

0 Cevap