Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1. Create a personal information using the numeric array and display/take screenshot of
the output of the code written using the format below:
<?php
$personalinfo[0] = "replace with your first name";
$personalinfo[1] = "replace with your middle name";
$personalinfo[2] = "replace with your last name ";
$personalinfo[3] = "replace with your course";
$personalinfo[4] = "replace with your mother’s maiden name";
Screenshot:
2. Create a personal information using the associative array and display/take
screenshot of the output of the code written using the format below:
<?php
$personalinfo['first'] = "replace with your first name";
$personalinfo['middle'] = "replace with your middle name";
$personalinfo['last'] = "replace with your last name";
Screenshot:
3. Create a personal information using the Multidimensional array and display/take
screenshot of the output of the code written using the format below:
<?php
$personalinfo = array(
array("first"=>"replace with your first name",
"middle"=>"replace with your middle name",
"last"=>"replace with your last name"),
array(
"first"=>"replace with your father’s first name",
"middle"=>"replace with your father’s middle name",
"last"=>"replace with your father’s last name"),
array(
"first"=>"replace with your mother’s first name ",
"middle"=>"replace with your mother’s middle name ",
"last"=>"replace with your mother’s last name "),
);
echo "My name is ".$personalinfo[0]["first"]."
".$personalinfo[0]["middle"]." ".$personalinfo[0]["last"]."<br />";
echo "My father’s name is ".$personalinfo[2]["first"]."
".$personalinfo[2]["middle"]." ".$personalinfo[2]["last"]."<br />";
echo "My mother's name is ".$personalinfo[1]["first"]."
".$personalinfo[1]["middle"]." ".$personalinfo[1]["last"]."<br />";
?>
?>
Screenshot: