• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
variables

#1
Lightbulb 
i need to used a variable for two functions . 

one function needs to assign data to the variable and next function needs to read that variable. how can I do this?
Reply

#2
Use the equal sign.

$myvar = "Basic php knowledge".
This will set the value of the variable.

To read the value, you can do this:
$myvar2 = $myvar
In php, echo $myvar2; will output the value.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.