Monday, 29 August 2016

How to print name of the variable which stores an array in php?

I want to print the array identifier name along with its content.

In situations where a page contains many arrays, then there is a confusion -
which elements belong to which array.



$user= array('id' => 1,'name' => "Tom");

//expectation
user
Array
(
[id] => 1

[name] => Tom
)

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...