Ghufron Asadly. Diberdayakan oleh Blogger.

json looping

Rabu, 14 Februari 2018

<?php
  // Loop through Array
  $someArray = ...; // Replace ... with your PHP Array
  foreach ($someArray as $key => $value) {
    echo $value["name"] . ", " . $value["gender"] . "<br>";
  }

  // Loop through Object
  $someObject = ...; // Replace ... with your PHP Object
  foreach($someObject as $key => $value) {
    echo $value->name . ", " . $value->gender . "<br>";
  }
?>

Tidak ada komentar:

Posting Komentar

 

Most Reading