This forum is now read-only. Please use our new forums at discuss.codecademy.com.

Functions, Part I Forum

View Course » View Exercise

1310 points
B6270a616d4928e20e682ac5a002c1f2?s=140&d=retro
Submitted by
bierson
over 2 years ago

Efficient way to handle 6/8

<html>
<p>
<?php
$ages = array();
for ($i = 1; $i < 6; $i++){
    array_push($ages, $i);
}
print count($ages);
?>
</p>

0 votes

permalink

Hi bierson,

That's an interesting way to do it. Please be careful about posting the code, though :)

2818 points
5674c6dae39efec455000434_879409444
Submitted by
Zeke Y
over 2 years ago