I want to use a user-defined variable that was created outside of a function INSIDE a function. How is this done?
Example:
$i = 0;
function CreateFields () {
echo "<div class=\"course" .$i. "\">";
$i++;
}
CreateFields();
but $i is not being recognized inside the function. Help?



Reply With Quote

Bookmarks