file

It reads entire file into an array

Example

<?php

echo “<pre>”;

print_r(file(“test.txt”));

?>


Output

Array
(
[0] => phpcodez
)

Share