<?php
$res = array(
array('id'=>0),
array('id'=>0),
array('id'=>0),
array('id'=>0),
array('id'=>0),
);
$i = 0;
while ($i < count($res)){
if($i%2==0){
$res[$i]['odd'] = true;
} else {
$res[$i]['odd'] = false;
}
}
print_r($res);
- Output for 5.6.38, 7.1.22, 7.2.10 - 7.2.33, 7.3.16 - 7.3.33, 7.4.3 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Process exited with code 137.
preferences:
129.35 ms | 403 KiB | 143 Q