# Split. Not really understanding it

**URL:** <https://forum.kirupa.com/t/split-not-really-understanding-it/256402>\
**Category:** Uncategorized\
**Created:** [April 2, 2008, 6:55pm UTC](https://forum.kirupa.com/t/split-not-really-understanding-it/256402 "2008-04-02T18:55:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Awesome\_O\_4000](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@Awesome\_O\_4000](https://forum.kirupa.com/u/Awesome_O_4000)\
**Post date:** [April 2, 2008, 6:55pm UTC](https://forum.kirupa.com/t/split-not-really-understanding-it/256402/1 "2008-04-02T18:55:38Z")

</div>

That title is sort of deceiving, because I see how it works. What I’m attempting to accomplish with it, however, is confusing to me. Let’s see if I can explain this without looking like an idiot. I’m just beginning to try to learn a bit of PHP, however, so i’m sure I will look like an idiot by the end of this post.

For a site I’m working on, the idea is to have the client be in charge of any content editing. So for instance, there is a news section, they can post/edit whatever they like via a simple text file, and it appears on the site by way of a php fread, leaving us without the pain in the \*\*\* of copywriting and such.

So say my text file looks like this:

```auto

sometext
\\\\
sometext2
\\\\
sometext3

```

where \\ is a separator. I am told I can “split” the \\ into an array, where 0=sometext, 1=sometext2, and so forth. I will then create a loop in order to display the text.

Does this sound correct in theory? Again, apologies if I sound retarded here. And if this is correct, could someone help me out with the PHP code? I have the fread all set up correctly I think.

```php

<?php
   $file = fopen("tester.txt","r");
   fread($file,filesize("tester.txt"));
   fclose($file);
?>

```
