You are here: Re: Easy question, return variable name « PHP Programming Language « IT news, forums, messages
Re: Easy question, return variable name

Posted by Tom on 12/14/06 21:34

Sorry, I should have been more specific -- I need the actual name of
the variable itself, not its datatype. So, I need function that does
the following:

<?php

$myArray = array( );
$myVariable = "foobar";

echo some_function($myArray); // should echo "myArray"
echo some_function($myVariable); // should echo "myVariable"

?>

Josh wrote:
> string gettype ( mixed var )
>
> this function will return the variable type in string format.
>
> Thanks
>
> Tom wrote:
> > Is there a function to get a variable to return its name w/datatype of
> > string? i.e.:
> >
> > $var would return "var"

 

Navigation:

[Reply to this 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

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