Little php coding stuff
Iam using below code to test with some global variable. it seems that global variable cannot be compared inside a function..
why its not displaying ‘hello world’ in the output?
below is the code that iam trying.
<?php
$bool = 1;
function boo() {
if ($bool == 1) {
$bool = 2;
echo 'Hello World';
}
}
?>
when I remove function boo(), its getting displayed ‘hello world’. may i know why it not displaying when function exists?
Total Views: 6 Today Views: 0














