# Split .txt content in php

**URL:** <https://forum.kirupa.com/t/split-txt-content-in-php/133700>\
**Category:** Uncategorized\
**Created:** [January 11, 2005, 8:24am UTC](https://forum.kirupa.com/t/split-txt-content-in-php/133700 "2005-01-11T08:24:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![2nd\_day](https://avatars.discourse-cdn.com/v4/letter/2/a4c791/32.png) [@2nd\_day](https://forum.kirupa.com/u/2nd_day)\
**Post date:** [January 11, 2005, 8:24am UTC](https://forum.kirupa.com/t/split-txt-content-in-php/133700/1 "2005-01-11T08:24:08Z")

</div>

hi guys,

I’m making a photogallery with discription and i want to be able to edit my discription online. I’ve got a .txt file with content like this:  
&filename.jpg=this is the discription of the pic  
&anotherfile.jpg=this is another discription

let’s say this .txt file has the name text.txt. In php i include this file (include(“this.txt”)😉 then the content of my file is shown. I want to split this content like an array… something like this $array = array(“filename.jpg” =\> “this is the discription of the pic”, “anotherfile.jpg” =\> “this is another discription”);  
so without the &character…

the problem is i don’t know how to split all this, so i need some help with that please…
