0
plese sovle sum global keyword...
hi i solving addation(+) problem sum using global keyword but showing error plese solve sum.... sorce code below... <?php $g= 2; $d= 1.2; function get() { global$g + global$d; echo $g .$d; } get(); ?> and see u geting output which datatype. it showing error plese help me and post true method i waiting for replay
1 Answer
+ 1
your syntax is wrong. i show you. its right.
<!DOCTYPE html>
<html>
<body>
<?php
$x = 75;
$y = 25;
function addition() {
$GLOBALS['z'] = $GLOBALS['x'] + $GLOBALS['y'];
}
addition();
echo $z;
?>
</body>
</html>