我的問題是。 我有一個數組,其中定位在這樣的元素:保持數組順序選擇HTML
[2] => '的2值'
[3] =>
[1] =>「價值 '的3值' 1'
而且我想要這樣。 但是,當發送數據到PHP/HTML時,它們是有序的。
[1] => '值爲1'
[2] => '的2值'
[3] =>
注 '的3值':密鑰必須保持我不能例如執行以下操作:
[1] =>
'的2值' [2] => '的3值'
[3] =>
'值爲1'我應該保留鑰匙嗎?
(我使用谷歌翻譯)
編輯:
我使用這個領域中的CakePHP:
<?php echo $this->Form->input('item_id', array('label' => 'Item', 'class' => 'span3', 'empty' => 'Escolha um item', 'data-depend-on' => '#ActionEstoqueId', 'data-source' => $this->Html->url(array('controller' => 'itens', 'action' => 'index', 'ext' => 'json'), true))) ?>
嘿帕特里克,我來自巴西太= P – 2012-08-01 20:06:50
是「關鍵的2值」工作字符串與這14個字符,或者它應該是一個參考? 順序很重要,但關鍵值是重要的嗎? – EricG 2012-08-01 20:06:53
你是如何發送這個數組,你從哪裏發送這個數組? – Palladium 2012-08-01 20:07:26