01-27-2008, 03:15 PM
|
#1 (permalink)
|
|
La Vida es Sueño
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
|
When was the last time you used the global construct?
If you remember, the global construct allows you to bring in variables to use in a function that didn't declare them. Like so:
php Code:
$iX = 2; $iY = 3; function multiply (){ global $iX, $iY; return $iX * $iY; }echo 'Total: ' . multiply ();
However, I really cannot remember the last time I used that in any of my scripts - thanks to OOP! How about everybody else?
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
|
|
|