Ok, here's some code that's based on mine. It's not the same for space-sake.
<?
$maxchars = 40;
function yada( $one, $two, $three )
{
$temp = $one+$two;
$final = $maxchars;
for( $i = 0; $i < $final; $i++ )
{
print "$temp<br>";
}
}
if( $something )
{
$one = 1;
$two = 3;
$three = 2;
yada( $one, $two, $three );
}
?>
Why can I not access the value of $maxchars inside of the function? From what I know if you declare it in a higher scope, it should be able to access it, right?
I've seen and tried this as well:
global $maxchars = 40;
global $maxchars;
$maxchars = 40;
GLOBAL $maxchars;
$maxchars = 40;
Any ideas? I can give further clarification if needed.