Quantcast
Channel: how works or operator in if statements and print - Stack Overflow
Viewing all articles
Browse latest Browse all 4

how works or operator in if statements and print

$
0
0

I have two questions

1) how can i make php to check getnext() function,if it exists or what value it has ???

$a = 1;if($a == 1 or getnext()== 1){    echo "yeap";                 //this works}

2)i want to write condition -- if $a or $b is equal to 1 , print the variable name that has the value of 1.

Is it possible to do in php ??can i do it this way???

if($a ==1 or $b==1){    print($a or $b);    }

thanks in advance:)


Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images