I'm trying to call this array but I'm getting an Array to string conversion Error. I'm not sure what I'm doing wrong, I'm just learning. If anyone could help me get this set up correctly I would greatly appreciate it!
Array:
public function getPricing()
{
$windows = array("Storm Windows" => array("(includes removal, cleaning,
and replacement)", " - $12.00")
, "Double Hung" => array("(opens up and down)" ,
" - $9.00")
, "Casement" => array("(crank out or stationary
window)" ," - $8.00")
, "Transom" => array("(rectangle window over top of a
window)" ," - $3.00")
);
return view('pages.pricing')
->with("windows", $windows);
}
Calling it in the view:
@foreach ($windows as $window => $DescriptionPrice)
<h2>{{$window . $DescriptionPrice}}</h2>
@endforeach