PHP Session Array Update -


i wish update single product quantity session new value using php.

how can this.

array data displayed

array  (      [products] => array          (              [0] => array                  (                      [name] => ford aa flatbed                      [code] => iwv001                      [qty] => 1                      [price] => 15.00                      [weight] => 0.12                  )                [1] => array                  (                      [name] => ford aa stakebed                      [code] => iwv003                      [qty] => 1                      [price] => 15.00                      [weight] => 0.21                  )            )    )

any appreciated.

i want able search through session , find product code , update quantity within product.

something this:

foreach($products &product) {     if ($product[code] == $codetoupdate) {         $product[qty] = $newqty;     } } 

of course, sequential search slow large data sets.


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -