Posted by macca on 10/19/07 03:38
> The above code doesn't seem to print anything out...
> it is mainly to compare values? then what if two variables have the
> same content? can it distinguish which is which?
I just wrote this now to give you an idea of how you could do this
thing... if i had two identical values...
$f = 2;
$h = 2;
and I pass it one, say $f (i.e. 2)
$arr = get_defined_vars();
print_debug($arr,$f);
it prints out:
$f = 2
$h = 2
as its the *value* being passed into the function. Seems to compare
values pretty well to me.
The point is, where theres a will theres a way. I came up with this in
a few munutes, i bet there would be some way to refine it given a
little more time and a little less squabbling...
or
just go with Jerry Stuckles method...its a lot easier.
[Back to original message]
|