Quote:
Originally posted by Nathan
15.
you do give them damn weird functions to use, but you said I _MAY_ want to use them, I don't... so here goes: $file_to_open is the filename to print every 5th line from.
Code:
$lines = file($file_to_open);
$i = 4;
while($i < count($lines)) {
echo $lines[$i];
$i += 5;
}
Ok, what do I win?
|
15/15!
You'd win a second interview if you were applying heh.
I told you it wasn't so hard ;p but you'd be amazed the number of people who get around 5-6 / 15 only. We use it to decide who should come back for the 2nd interview (of 4 total interviews).
You're only the second person to get the intended trick in the 13th question though. Out of something like 40 people we have interviewed. (the hahah was supposed to be a open bracket for the if/elseifs).