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().

BY Best Interview Question ON 07 Apr 2020

Example

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