PHP Example
Screen shot
To use of Global and Local Varible.

<?php
$global_data="This is global data";
function show()
{
$global_data="This is Local data";
echo "<br>".$GLOBALS["global_data"];
echo "<br>".$global_data;
}
show();
?>