<?php
mix public ArrayObject::offsetGet ( mix $index )
where,
$index = The index to get the value
?>
<?php
$arrcolor = new ArrayObject([ 'CMYK', 'cyan', 'magenta', 'yellow', 'four' => 'black']);
foreach($arrcolor as $k => $key)
{
echo '[ ' . $k . ' ] - ';
var_dump($arrcolor->offsetGet($k));
echo '<br><br>';
}
?>
<?php
$arrcolor = new ArrayObject([ 'CMYK', 'cyan', 'magenta', 'yellow', 'four' => 'black']);
$arrcolor->offsetSet('RGB', ['red', 'green', 'blue']);
foreach($arrcolor as $k => $key)
{
echo '[ ' . $k . ' ] - ';
var_dump($arrcolor->offsetGet($k));
echo '<br><br>';
}
?>