Get the index ,while inserting a element into php numeric index array -


यहाँ जैसे उदाहरण कोड।

  & lt;? Php $ new_room_result = array () ; $ कमरे = सरणी ('सिंगल रूम', 'डेल्क्स रूम', 'प्रेसिडेंट रूम', 'सीवेि रूम'); विदेशी मुद्रा ($ कमरे $ कमरा) {$ new_room_result [] = $ कक्ष; // अगले चरण - आखिरी प्रविष्टि के सूचकांक के बाद मैं सूचकांक प्राप्त करना चाहता हूं I }? & Gt;  

क्या किसी के पास कोई विचार है?

<पूर्व> foreach ($ कमरे $ कमरा) {$ new_room_result [] = $ कक्ष; अंत ($ new_room_result); // सरणी $ key = key ($ new_room_result) के अंत में आंतरिक सूचक को स्थानांतरित करें; var_dump ($ कुंजी); }

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -