js for(key in arr){ console.log(arr[ key ] = arr[key]); } php $arr = array(k1:v1,k2:2); for($arr as $k=$v){ echo $k . = . $v . br/; }
js
for(key in arr){
console.log("arr[" + key + "] = " + arr[key]);
}
php
$arr = array("k1":"v1","k2":2);
for($arr as $k=>$v){
echo $k . " = " . $v . "
";
}