Question:What is the best way to iterate and modify every element of an array using PHP 5? 

A You cannot modify an array during iteration 

B for($i = 0; $i < count($array); $i++) { /* ... */ } 

C foreach($array as $key => &$val) { /* ... */ } 

D foreach($array as $key => $val) { /* ... */ } 

E while(list($key, $val) = each($array)) { /* ... */ 

+ Answer
+ Report
Total Preview: 919

Copyright © 2025. Powered by Intellect Software Ltd