<?php// Five shares and their closing price over the last fifteen days.$stocks=['ASML'=>[640,652,648,661,670,668,684,679,692,701,698,712,709,725,731],'Philips'=>[21.4,21.1,20.8,21.0,20.6,20.2,20.5,19.9,19.6,19.8,19.3,19.5,19.1,18.8,18.9],'Shell'=>[30.1,30.4,30.2,30.9,31.3,30.8,30.6,31.1,31.4,31.0,31.6,31.9,31.5,31.8,32.2],'Heineken'=>[88,87,89,86,88,90,87,85,88,89,86,87,90,88,89],'Adyen'=>[1210,1185,1240,1302,1276,1330,1295,1361,1408,1372,1440,1415,1478,1452,1499]];$shares=[];foreach($stocksas$name=>$closes)$shares[]=['name'=>$name,'closes'=>$closes,'last'=>end($closes),'change'=>round((end($closes)/$closes[0]-1)*100,1)];?>