|
Posted by jerry gitomer on 05/23/05 16:43
micha wrote:
> micha <chotiwallah@web.de> wrote in
> news:Xns965B92A7087Fchotiwallah@204.153.244.170:
>
>
>>i have the following code:
>>
>>function some_function($argument)
>> {
>> validate_arg();
>> //more code
>> }
>>
>>function validate_arg()
>> {
>> //this function validates the argument of some_function()
>> }
>>
>>is it possible for validate_args() to automatically read the argument
>>of some_function() or do i have to note the argument in the brackets
>>in any case?
>>
>>thx, micha
>>
>
>
> debug_backtrace() is a very good way, because it supplies a lot of other
> information too to use in my validator.
>
> thx, micha
>
Micha,
You have to specify the argument in the brackets. (Well, I
suppose it might be possible to avoid doing so, but why go
looking for trouble?)
So, your code should look like:
function some_function($argument)
{
validate_arg($argument);
//more code
}
function validate_arg($argument)
{
//this function validates the argument of some_function()
}
HTH
Jerry
Navigation:
[Reply to this message]
|