Last active
August 29, 2015 14:10
-
-
Save xabbuh/98155708898ceeff32c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// get the old stored value from the session | |
$modeloMarcaProductoArr = $session->get('modeloMarcaProductoId'); | |
// add a new entry to the array | |
$modeloMarcaProductoArr[$marca->getId().'-'.$modelo->getId()] = $modeloMarcaProducto->getId(); | |
// write this array back into the session | |
$session->set('modeloMarcaProductoId', $modeloMarcaProductoArr); | |
// later on, retrieve the values stored in the session | |
$modeloMarcaProductoArr = $session->get('modeloMarcaProductoId'); | |
var_dump($modeloMarcaProductoArr['1-3']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment