<?php $emp_det = array (Name => "A", Age => "2" , Code =>"8", Designation => "Administrator"); foreach ($emp_det as $key=>$temp) { echo "$key = $temp","\n"; } ?>