<?php
// The sample array
$array = array( "z" => "a", "x" => "b", "y" => "c" );
/*******************************************************************
* EITHER ...
*******************************************************************/
// Reset internal pointer to the begin
reset( $array );
// Get key ...
$key = key( $array );
// ... and value
$value = current( $array );
/*******************************************************************
* ... OR ...
*******************************************************************/
// Slice array's first element
$first = array_slice( $array, 0, 1, true );
// Get key ...
$key = key( $first );
// ... and value
$value = current( $first );
/*******************************************************************
* ... AND ALSO ...
*******************************************************************/
// Get key ...
$key = array_shift( array_keys( $array ));
// ... and value
$value = array_shift( array_values( $array ));
?>
13.08.2011 - Counter-Strike GO ...[more] |
|
10.04.2011 - Monday Night Combat ...[more] |
|
25.02.2011 - Humorvolles ...[more] |
|
23.01.2011 - 1.5 GHz, 3 GB Speicher, ... ...[more] |
|
20.01.2011 - Liste der QuakeNet Achievements und wie man sie bekommt bereitgestellt ...[more] |
|
31.12.2010 - Guten Rutsch ...[more] |
|
16.12.2010 - gelignAIte - Official Release ...[more] |
|
11.11.2010 - openTTD AI ...[more] |
|
26.10.2010 - Zeitreisen scheinen möglich ...[more] |
|
04.09.2010 - Abschaltung "index.php4" ...[more] |
|