ArrayObject::offsetGet

(PHP 5 >= 5.0.0)

ArrayObject::offsetGetReturns the value at the specified index

Description

mixed ArrayObject::offsetGet ( mixed $index )

Parameters

index

The index with the value.

Return Values

The value at the specified index or FALSE.

Examples

Example #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'));
?>

The above example will output:

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


Copyright © 2010-2024 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout