#32. PHP Array

What is Array:

Stores Value In Array:



Run code:

<?php
$Std = array("Aqib","Asif","Saqib","Sheikh",30,49.3);
//$Std = ["Aqib","Asif","Saqib","Sheikh",30,49.3];  // [] sy bhi array var store kr skty hy
// echo $Std[0]. "<br>";
// echo $Std[1]. "<br>";
// echo $Std[2]. "<br>";
// echo $Std[3]. "<br>";
// echo $Std[4]. "<br>";
// echo $Std[5]. "<br>";
//-----------------------------------
// as a testing for print other method function in PHP
// echo "<pre>"; // for designing
// print_r($Std);
// echo "</pre>";
//---------------------------------------------
// Using For each Loop
for($a = 0; $a < 4; $a++){
    echo $Std[$a]."<br>";
}
?>

Comments

Popular posts from this blog

#30. PHP Recursive Function