mrherman Posted March 31, 2012 Share Posted March 31, 2012 I did a phpfreaks search for this, but didn't find anything specific. How can I echo out an array name? I have a function to return the array contents (for debugging purposes), and I need it to generate the actual name of the array as well. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/260068-echo-array-name/ Share on other sites More sharing options...
litebearer Posted March 31, 2012 Share Posted March 31, 2012 perhaps seeing the code that creates the array may help Quote Link to comment https://forums.phpfreaks.com/topic/260068-echo-array-name/#findComment-1333008 Share on other sites More sharing options...
kicken Posted March 31, 2012 Share Posted March 31, 2012 If by name you mean the variable name, then there is no way to determine that. If you mean something else, you'll have to explain more. Quote Link to comment https://forums.phpfreaks.com/topic/260068-echo-array-name/#findComment-1333010 Share on other sites More sharing options...
mrherman Posted March 31, 2012 Author Share Posted March 31, 2012 Yes, I meant the variable name. Thanks for the answer. Quote Link to comment https://forums.phpfreaks.com/topic/260068-echo-array-name/#findComment-1333035 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.