Remove array key from array in cakephp -


print array

array(     'order' => array(         'id' => '1',         'base_price' => '65',         'min_price' => '95',                 ) ) 

is possible remove key('order') when retrieving data? if not how can use array_shift or end in 1 line , prevent below error?

i getting error only variables should passed reference when remove key array.

$orders = array_shift or end ($this->order->read(null, $id)); debug($orders); 

you want id following code you

 $arrorderid=set::extract("/order/id",$data); 

here $data array want delete "order" key.

you following array when debug($arrorderid);

[0]=>1 

if want base_price write following code

$arrorderid=set::extract("/order/base_price",$data); 

Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -