The simple program is not returning the string,Please help.
<?php
function returnStr() {
return "fooBar";
}
$str=returnStr();
echo $str;
}
?>
There's a fatal error tokenizing the code due the trailing/unmatched '}' remove that and the code will work. Then spend some time thinking about why you didn't know this already
It's a parse error:
$str=returnStr();
echo $str;
} // WHAT IS THIS BRACKET DOING HERE?
There's an error in your code. The last }
is useless.