PHP 5.6.0 released

pos

(PHP 4, PHP 5)

posAlias de current()

Description

Cette fonction est un alias de : current()

add a note add a note

User Contributed Notes 2 notes

up
0
vinicius at codemakers dot com dot br
3 months 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
up
-14
ranit8085 at gmail dot com
1 year ago
<?php
$letter
= array('a', 'b', 'c', 'd','e','f');
$cur_letter = current($letter);

$arr = array();
var_dump(current($arr));

?>
To Top