Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

iterate through an associative array php

<?php 
$freelancer = array( 
    "name" => "Eric", 
    "email" => "Eric@gmail.com", 
    "age" => 22, 
    "gender" => "male"
); 
  
// Loop through employee array 
foreach($freelancer as $key => $value) { 
    echo $key . ": " . $value . "<br>"; 
} 
?>
Source by flexiple.com #
 
PREVIOUS NEXT
Tagged: #iterate #associative #array #php
ADD COMMENT
Topic
Name
6+3 =