The current() function returns the value of the current element in an array.
Syntax:current(array)
In above syntax, "array" specifies the array to use
<?php
$vehicle = array("Car", "Scooter", "Motorcycle", "Truck");
echo current($vehicle)."<br>";
?>
Output:
The pos() function returns the value of the current element in an array.
Syntax:pos(array)
In above syntax, "array" specifies the array to use.
<?php
$vehicle = array("Car", "Scooter", "Motorcycle", "Truck");
echo pos($vehicle)."<br>";
?>
Output:
Others
Languages
Frameworks
Web / Design
Mobile Technology
Sql & Technology
R4R