Posted by Martyr2 on 04/11/06 23:39
Remember that variables inside a function like this are treated as
local variables unless specified by the "global" keyword. Since I don't
see you defining the variable $lang in your function, it is empty and
thus no message is returned.
Fix - Either define the $lang as "global" in the function (that is if
$lang is defined outside the function) or the better way is to be sure
to pass the $lang variable as a parameter to this function.
Here is a resource link to what I am talking about... it is a variable
scoping issue I am guessing from what I see there.
http://ca.php.net/manual/en/language.variables.scope.php
Hope this helps :)
[Back to original message]
|