I want to set array value by their index/value in php or javascript in cakephp.I fetch data from stored procedure in model.My demo code is
Array
(
[0] => Array
(
[text] => --Select--
[value] =>
)
[1] => Array
(
[value] => 269
[text] => Being amount paid to supplier
)
[2] => Array
(
[value] => 268
[text] => Cash Received
)
[3] => Array
(
[value] => 267
[text] => Cheque Received
)
)
I want to set dropdown value ,my second array value is
Array
(
[0] => Array
(
[DefaultNarration_071] => 268
)
)
so how i set my dropdown value 268 id.so please suggest me appropriate solution.