/ Published in: PHP

Beginner PHP Chapter 5 - Arrays
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php echo $patient1['name']; //This will display the string 'Sandra James'. echo $patient1['visits'][0]; //This will still display 'Array', because the returned value is an array. echo $patient1['visits'][1]['time']; //This will display the string '2.15PM'. ?>
Comments
