- var_dump: documentation ( source)
- file: documentation ( source)
<?php
$uri='http://www.yodlecareers.com/puzzles/triangle.txt';
//$uri='input.txt';
//$file = fopen($uri,'r');
//var_dump($file);die;
$rows = file($uri, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
echo count($rows).'\n\n';
var_dump($rows[4]);