Jump to content

string to variable name


kkroo

Recommended Posts

I have a function that gets the names of $lang arrays from a language file, the problem that i am facing is that i would like to print_r the array name that is returned from the function. But the function returns as a string, for example, $lang['Test']. What do i do so php reconizes it as a variable that represents an array and not a variable that represents a string?
Link to comment
https://forums.phpfreaks.com/topic/5675-string-to-variable-name/
Share on other sites

Can you post your code and a sample of the data. That may help us understand your question better. In the mean time you might want to look at [a href=\"http://us2.php.net/manual/en/language.variables.variable.php\" target=\"_blank\"]variable variables[/a].

Ken
Link to comment
https://forums.phpfreaks.com/topic/5675-string-to-variable-name/#findComment-20269
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.