[PHP] Split .txt into an array

How would i get a .txt that looks like this:

firstline
secondline
thirdlin

so that i can use it like:

<php print($array[1]); ?>

Which would show secondline.

Thanks.