ArrayObject
PHP Manual

ArrayObject::offsetGet

(PHP 5 >= 5.1.0)

ArrayObject::offsetGetReturns the value at the specified index

설명

mixed ArrayObject::offsetGet ( mixed $index )

인수

index

The index with the value.

반환값

The value at the specified index or FALSE.

예제

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

위 예제의 출력:

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


ArrayObject
PHP Manual