Return to Snippet

Revision: 59468
at September 9, 2012 21:58 by ashmenon


Initial Code
<?php

//First let's combine the visits together. 

$visits = array($visit1, $visit2, $visit3);

print_r($visits);

/* That will display like this: 

Array(
	  [0] => Array(
				   [date] => 11/12/09
				   [time] => 11.02AM
				   )
	  [1] => Array(
				   [date] => 13/01/10
				   [time] => 2.15PM
				   )
	  [2] => Array(
				   [date] => 16/01/10
				   [time] => 10.57AM
				   )
	  )

*/

//And then we add this value to the patient variable.

$patient1['visits'] = $visits;


?>

Initial URL

                                

Initial Description
Beginner PHP Chapter 5 - Arrays

Initial Title
Beginner PHP Chapter 5 - Arrays - Code Block 11

Initial Tags

                                

Initial Language
PHP