Return to Snippet

Revision: 59463
at September 9, 2012 21:47 by ashmenon


Initial Code
<?php

$name = 'Sandra James';
$age = 45;
$bloodType = 'B+';
$height = 175;
$weight = 65;

$patient1 = array($name,$age,$bloodType, $height, $weight); //This creates an array with Sandra's name, age, and blood type.

print_r($patient1);

/* That will show you the following: 

Array(
	  [0] => Sandra James
	  [1] => 45
	  [2] => B+
	  [3] => 175
	  [4] => 65
	  )
	  
*/

?>

Initial URL

                                

Initial Description
Beginner PHP Chapter 5 - Arrays

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

Initial Tags

                                

Initial Language
PHP