I have a strange problem. my script keeps on adding a space to the end of every element in an array i created using the file() command. This sucks because it screws up my script...for instance-->
$dir = "../mydir/$list[2]/myfile.php"
..will turn out looking like this-->
../mydir/dir /myfile.php
that extra space messes this thing up! I tried using
$dir2 = ereg_replace(" ","",$dir);
but that didn't work. Does anyone know a way to get rid of that extra space????