Reads entire file into an array.
Parameters
$filestringrequired- Path to the file.
Source
public function get_contents_array( $file ) {
$contents = $this->get_contents( $file );
if ( is_string( $contents ) ) {
return explode( "\n", $contents );
}
return false;
}
Changelog
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.