# Reading from Text File

**URL:** https://forum.kirupa.com/t/reading-from-text-file/306450
**Category:** programming
**Created:** [March 15, 2010, 7:39pm UTC](https://forum.kirupa.com/t/reading-from-text-file/306450 "2010-03-15T19:39:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Dj\_Studios](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@Dj\_Studios](https://forum.kirupa.com/u/Dj_Studios)
#### Post date: [March 15, 2010, 7:39pm UTC](https://forum.kirupa.com/t/reading-from-text-file/306450/1 "2010-03-15T19:39:23Z")

</div>

Ok guys I’m a loss here and need some help.

I have a text file that reads like this:

```auto
"ID","VID","Make","Model"

```

That goes on for lots of different objects. Now I have an idea of how I would output to PHP but I’m still a little confused.

Would I do something like fopen and make short name variables for each attribute in quotations above?

```auto
// Make short variables
$ID = $_GET['ID'];

```

And then use those to make a template type thing? Or am I on the wrong track?

BTW the ID, Make etc are on the first line and then each line after that actually has information I need to output to a page. So am I sort of looking at an XML file saved as a text file?

Any help is appreciated.
