|
|
Tutorials » Php »
|
Topic |
What is pos() Function?
|
|
Explanation |
|
The "pos()" function is the alias of current() function.
Syntax:
pos(array)
In the above syntax "array" is the array from which the current element is to be displayed.
Example:
<?php
$b=array("Grapes","Apple","Cherry");
echo pos($b);
?>
Result:
Grapes
In the above example from the array "$b", the current element "Grapes" is displayed.
|
|
A Note |
Learn PHP programming language tutorial with simple and neat example. Hope you enjoy this free tutorial.
Do give us your valuable feedback and suggestions on this online tutorial. This is a Copyright Content.
|
|
|
|