Jump to content

[SOLVED] echo not working properly in functions


WhiteCube

Recommended Posts

hi all!

 

I've got this php script here.. but it doesn't seem to work when in a function!

 

<?php
$username = "sss";

  $exe = "users";
  $exe();
  
   function users()
  {  
    echo "username=$username";
  }
?>

 

While reading this.. it should echo out.. "username=ssss".. right?

 

But I keep getting

 

"username=" just that!!

 

Can someone tell me what's going on?

 

Thanks!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.