PHP Programing language

How can using index in square bracket to create a new element and or assign value
Previous Home Next
<html>
<head>
<title>Use the index in square brackets to create new elements 
and or assignvalues</title>
</head>
<body>
<?php
$a=array('harsh',123,'aditya');
$a[1]='onetwothree';
$a[4]='mukund';
echo($a[0]),"<br>";
echo($a[1]),"<br>";
echo($a[2]),"<br>";
echo($a[4]),"<br>";
?>
</body>
</html>

 

Output:

Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: