Hi all,
I am reading information from a non-delimited txt file and putting that information, in this example people and grades, onto a webpage using html/php using tables. I have managed to build the tables but the headings do not line up. Have been trying to get this for ages but can’t see what the problem is. Any clues?
Grateful for any and all help.
PHP CODE:
<?php $txt_file = file_get_contents('input.txt'); $rows = explode("\n", $txt_file); array_shift($rows); echo "NAME | SCORE | GRADE | |||
---|---|---|---|---|---|
" . $info[$row]['name'] . " | "; echo "" . $info[$row]['score'] . " | "; echo "" . $info[$row]['result'] . " | "; echo "
INPUT.txt
bill 45 Fail
fred 64 Pass
tom 62 Pass
tim 55 Pass
roger 10 Fail
nigel 67 Pass