All the answers here are good, but... are you sure you want to do this?
Changing global variables from within functions is generally a bad idea, because it can very easily cause spaghetti code to happen, wherein variables are being changed all over the system, functions are interdependent on each other, etc. It's a real mess.
Please allow me to suggest a few alternatives:
1) Object-oriented programming
2) Having the function return a value, which is assigned by the caller.
e.g. $var = checkdate();
3) Having the value stored in an array that is passed into the function by reference
function checkdate(&$values) {
if (condition) {
$values["date"] = "01-01-11";
}
}
Hope this helps.