Hey all, I've got an array, and a changes an array to only the even numbered array keys.
function evenNo($ar){
for($i=1;$i<count($ar);$i=$i+2){
unset($ar[$i]);
}
}
$wind = Array('north','north-east','east','south-east','south','south-west','west','north-west');
evenNo($wind);
You see, I'm trying to pass $wind, but I just can't seem to do it. It's a problem that no matter what I do I can't seem to solve.
I've tried dumping it, but it's not helping the problem, because I still can't seem to pass $wind
Any helps will be appreciated, I need a solution, otherwise I may need to explode().
😉