Home | Computer Science

1. Write a programmer using switch

<html>
<body>
<?php
function arr(){
$a[0]=2;
$a[1]=4;
$a[2]="hello";
echo $a[0]."  ".$a[1]."<br>".$a[2];
}
arr();

?>
</body>
</html>

Output:-
2 4
hello

 Write a programme using switch

<html>
<body bgcolor="green">
<?php
function arr(){
$a[0]=2;
$a[1]=4;
$a[2]="Hanish";
echo$a[0]. " " .$a[1]."<br>".$a[2];}
arr();
?>
</body>
</html>

output:- 

2

4