<?php
 
/**
* Combine Arrays
*
* This script demonstrates how to combine two arrays.
* 
* @author       Blaze Script
* @website      https://blazescript.com
* @date         January 2019
*/
 
// Variables
$desserts = array("ice cream","cookies","cake","pie","candy");
$toppings= array("cherries","nuts","sprinkles","whipped cream","chocolate");
 
// Combine arrays and display contents
foreach(array_combine($desserts, $toppings) as $dessert => $topping) {
    echo $dessert." with ".$topping."<br>";
}
 
?>