# Text file to array

**URL:** <https://forum.kirupa.com/t/text-file-to-array/328085>\
**Category:** programming\
**Created:** [April 18, 2012, 10:23am UTC](https://forum.kirupa.com/t/text-file-to-array/328085 "2012-04-18T10:23:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LordNecro](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@LordNecro](https://forum.kirupa.com/u/LordNecro)\
**Post date:** [April 18, 2012, 10:23am UTC](https://forum.kirupa.com/t/text-file-to-array/328085/1 "2012-04-18T10:23:18Z")

</div>

Hey guys, I’m trying to use a variable in a loop to generate multiple divs, that use javascript to have hidden divs. for some reason when i use the variable in my echo it creates a line break after the variable. therefore it is having trouble understanding the javascript function. any ideas on preventing variables from making a line break after being echo’ed
