How to print array values in php?
To print all the values inside an array in PHP, use the for each loop.
Here’s an example to demonstrate it:
$colors = array("Red", "Green", "Blue", "Yellow", "Orange");
// Loop through colors array foreach($colors as $value){ echo $value . "
"; }
Output:
Red
Green
Blue
Yellow
Orange
BY Best Interview Question ON 15 Apr 2020