My array:
$arr = array("jan","feb","mar","apr","mei","jun","jul","agu","sep","okt","nov","des");
then i do foreach
foreach($arr as $ar){ echo $ar; }
which will bring jan to des
My question is: how to display previous values ββin the current key?
For example, when I get to feb, I want to display jan too, when I get to jul, I want to display jun, etc.
arrays php
Henson
source share