pos

(PHP 4, PHP 5, PHP 7)

posAlias of current()

Description

This function is an alias of: current()

add a note add a note

User Contributed Notes 1 note

up
6
vinicius at codemakers dot com dot br
228 years ago
<?php
    $countries
= array("Brazil", "England", "Japan", "France");
   
   
// Get the current position
   
echo pos($countries); // print Brazil
   
    // Go to next position
   
echo next($countries); // print England
   
    // Current position
   
echo pos($countries); //  print England
   
    // Previous position
   
echo prev($countries); // print Brazil
   
    // End Position
   
echo end($countries); // print France
   
    // Current position
   
echo pos($countries); // print France
To Top