logo CodeStepByStep logo

file_reading1

Language/Type: PHP basics file io
Author: Melissa Hovik (on 2018/11/22)

Suppose we have a file called sample.txt with the following contents:

This is a line!
This is another line!

Which of the following statements will result in $contents holding the following array?

["This is a line!", "This is another line!"]
correct statement
(order shuffled)

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.