PHP program to print an array.
The below program is to print an array. The PHP echo statement is used to output the result on the screen. An array is a single variable which can store multiple values at a time.
<!DOCTYPE html> <html> <body> <?php $food = array("PIZZA", "BURGER", "COKE"); echo "I love to eat " . $food . ", " . $food . " and " . $food . "."; ?> </body> </html>
I love to eat PIZZA, BURGER and COKE.