PHP Mysql LM - Exp Number - 5
PHP Mysql LM - Exp Number - 5
Mandal’s,
Marathwada Institute of Technology, Aurangabad
Department of Computer Applications
PRACTICAL - LAB MANAUL
CLASS : FY-MCA- 2021-22 PART-II SUBJECT : PHP MySql Lab
LIST OF EXPERIMENTS
1. Program based on HTML tags (text formatting, images, font, hyperlink, list and
tables)
2. Program based on CSS (Inline, Internal and External CSS) , css properties for
email validations)
10. Program based on Insert, Select, Update and Delete operations on database tables.
Array in PHP
An array stores multiple values in one single variable
In PHP, there are three kinds of arrays:
Numeric array
Associative array
Multidimensional array
30
Shailendra
45.56
45
35
78
Sharma
$marks=array(
"Adity"=>50,
"Ashwini"=>56,
"Govind"=>78,
"Shailendra"=>90
);
echo "<pre>";
print_r($marks);
foreach($marks as $xyz)
{
echo $xyz."<br>";
}
?>
</body>
</html>
Array
(
[Adity] => 50
[Ashwini] => 56
[Govind] => 78
[Shailendra] => 90
)
50
56
78
90
foreach($marks as $nm=>$mrk)
{
echo 'Name :'.$nm;
foreach($mrk as $m=>$m1)
{
echo " $m:$m1";
}
echo "<br>";
}?>
</body>
</html>