I want to read line by line but I do not want to deal with newline, I want it to be removed so I only end up with the content of the line.
So right now my function i
Either a regular expression (fetching the last occurence of \n in a line and stripping it) or simple $name = substr($name, 0, -2) would do the trick
$name = substr($name, 0, -2)