Posted By

ashmenon on 09/09/12


Tagged


Versions (?)

Beginner PHP Chapter 5 - Arrays - Code Block 13


 / Published in: PHP
 

Beginner PHP Chapter 5 - Arrays

  1. <?php
  2.  
  3. echo $patient1['name']; //This will display the string 'Sandra James'.
  4. echo $patient1['visits'][0]; //This will still display 'Array', because the returned value is an array.
  5. echo $patient1['visits'][1]['time']; //This will display the string '2.15PM'.
  6.  
  7. ?>

Report this snippet  

You need to login to post a comment.