I am trying to change a variable that is outside of a function, from within a function. Because if the date that the function is checking is over a certain amount I need it
Just use the global keyword like so:
global
$var = "01-01-10"; function checkdate(){ global $var; if("Condition"){ $var = "01-01-11"; } }
Any reference to that variable will be to the global one then.