# Using readlines()
file1 = open('myfile.txt', 'r')
Lines = file1.readlines()
# Question: Which function is used to read single line from file?
# Answer: readline()
<?php
$file = fopen("welcome.txt","r")or exit("unable to open file!");
while(!feof($file)){
echo fgets($file)."<br>";
}
fclose($file);
?>