Reply to Re: print out variable name as well as its content

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация