php - Manipulate value in Zend_Registry -


i have array write zend_registry:

zend_registry::set('myarray', $myarray); 

now want add new value array. know zend_registry not choice @ , know kind of read-only. there way update it?

thanks in advance!

it has been long while since have manipulated registry have asked, think can following:

$myarray = zend_registry::get('myarray'); $myarray['key'] = $value; zend_registry::set('myarray',  $myarray); 

this gets value out of zend_registry, adds element array, , sets registry again.


Comments

Popular posts from this blog

android - How to save instance state of selected radiobutton on menu -

python 3 IndexError: list index out of range -

IF statement in MySQL trigger -