PHP program to reverse an array
Write a PHP program to reverse an array
In this tutorial, you will learn how to reverse an array in php.
Below is the php script to reverse an array in php.
<title>PHP program to reverse an array</title>
<h2>Write a PHP program to reverse an array</h2>
$colors = array("red","green","blue");
$count = sizeof($colors);
echo "Count of the given array is: ".$count."<br>";
echo "Before Reverse Operation</br>";
for ($i=0; $i<$count; $i++)
echo "<br>After Reverse Operation</br>";
for ($i=$count-1; $i>=0; $i--)
Thanks for reading.
Latest PostsPHP program to demonstrate user login | Login System in PHP PHP program to format the date functions in php PHP program to display Good Morning / Good Afternoon / Good Evening message according to current time. PHP program to fetch data from database and display in a HTML table Count Number of Visits on a web page using cookies in php PHP program to develop E-mail registration form PHP program to create a .txt file and write some content in it. PHP program to find out maximum and minimum number in an array PHP program to reverse an array PHP program to replace one string using another string in php
© Copyright - 2018 - 2022 | All rights reserved at Funda of Web IT