1.

How to display array structure and values in PHP?

Answer»

You can either use the PHP var_dump() or print_r() FUNCTION to check the structure and VALUES of an ARRAY. The var_dump() method gives more information than print_r().

Example

$LISTS = array("BEST", "Interview", "Questions");
// Print the array
print_r($lists);
var_dump($lists);



Discussion

No Comment Found