ArrayObject
PHP Manual

ArrayObject::offsetGet

(PHP 5 >= 5.1.0)

ArrayObject::offsetGetReturns the value at the specified index

Beschreibung

mixed ArrayObject::offsetGet ( mixed $index )

Parameter-Liste

index

The index with the value.

Rückgabewerte

The value at the specified index or FALSE.

Beispiele

Beispiel #1 ArrayObject::offsetget example

<?php
$arrayobj 
= new ArrayObject(array('zero'7'example'=>'e.g.'));
var_dump($arrayobj->offsetget(1));
var_dump($arrayobj->offsetget('example'));
var_dump($arrayobj->offsetexists('notfound'));
?>

Das oben gezeigte Beispiel erzeugt folgende Ausgabe:

int(7)
string(4) "e.g."
bool(false)


ArrayObject
PHP Manual