0
What output results from the following code?...
<?php $num = 18; $num--; echo$num; ?> please!!!...help me. heee.i
14 RĂ©ponses
+ 5
Did you try to copy past the code in code playground section ?
+ 5
The Answer is 17
+ 3
its 7
+ 2
It will echo 17
$variable-- is the post decrement operator. First it will give 18 then decrease by one.
If it was like:
$num = 18
echo $num--;
Output would be: 18
Since it is post decrement, directly using it with echo will output original number.
+ 2
17
+ 1
17
+ 1
17
0
thanks solmate
0
ERROR!
0
Output is 17
thanks
lovegraphist on solo learn
0
its 7 dumb heads!!!!!!!!!!!!!!!!!!!!!!!!!!!!
0
The ans is x
0
What output results from the following code?
0
17