31
What will be the output of the following PHP code ?
<?php
$a = "hello";
if (strlen($a))
print strlen($a);
else
print "hi";
?> Answer & Solution
Answer: Option
B
Solution:
The function strlen($a) gives the length of the string,5, which is considered true.