Skip to content

Commit

Permalink
Merge pull request #438 from MFR414/array-php
Browse files Browse the repository at this point in the history
Example Of Array In PHP
  • Loading branch information
fineanmol committed Oct 2, 2021
2 parents 5be05a3 + c5ab0ff commit 6f76f52
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Contributors.html
Original file line number Diff line number Diff line change
Expand Up @@ -581,10 +581,12 @@
<a class="box-item" href="https://github.com/utsaverma2001-crypto"><spann>Utsav Verma</span></a>
<a class="box-item" href="https://github.com/whatharshcodes"><span>Harsh</span></a>


<a class="box-item" href="https://github.com/thet3o/"><span>Matteo Vacalebri</span></a>

<a class="box-item" href="https://github.com/arunim-iiitlCS"><span>Arunim Singhal</span></a>
<a class="box-item" href="https://github.com/ahad-abd"><span>Abdul Ahad</span></a>
<a class="box-item" href="https://github.com/MFR414/"><span>M Firmansyah Rifai</span></a>



Expand Down
16 changes: 16 additions & 0 deletions Program's_Contributed_By_Contributors/PHP_Programs/Array.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php
//create and assign values to Array
$phoneBrands = array("Xiaomi", "Samsung", "HP", "LG", "Realme");

//count array length
$arrlength = count($phoneBrands);

//print Phone Brands: to view
echo "Phone Brands: <br>";

//looping Through the array
for($x = 0; $x < $arrlength; $x++) {
echo $phoneBrands[$x];
echo "<br>";
}
?>

0 comments on commit 6f76f52

Please sign in to comment.