I'm unable to modify the global variable inside the function nor display echo the message on the browser. Please help me
<!DOCTYPE html>
<html> 
<body>
   <?php 
     $response = array(); 
    function() { 
        global $response['res']="hello"; 
        echo json_encode($response); 
     } 
    echo "hello";
    ?>
    </body>
    </html>
 
    
