# TXT file to PHP array

**URL:** <https://forum.kirupa.com/t/txt-file-to-php-array/331283>\
**Category:** programming\
**Created:** [June 28, 2013, 6:27pm UTC](https://forum.kirupa.com/t/txt-file-to-php-array/331283 "2013-06-28T18:27:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bking20](https://avatars.discourse-cdn.com/v4/letter/b/e495f1/32.png) [@bking20](https://forum.kirupa.com/u/bking20)\
**Post date:** [June 28, 2013, 6:27pm UTC](https://forum.kirupa.com/t/txt-file-to-php-array/331283/1 "2013-06-28T18:27:46Z")

</div>

I’m trying to take a txt file (on server) and load it’s contents into a small array using PHP. The contents is a list of numbers separated by spaces (ex: 34 32 12 10 8). I actually only really need to load the first number, but the only way I know to isolate this number would be to put the whole list in an array. Any thoughts?
