PHP – reads text file without new line character

If you’re trying to read text file with file() function (or something similar) and it returns file content without new line recognition¬†probably php configuration is set to not detect line endings. To avoid this (if anything else does not solve your problem) you can use ini_set() in your PHP script – as follow:

This should do the trick.

Learn X in Y minutes

Creating new project from scratch very often forces us to choose proper technology – we can use wide range of programing languages and frameworks so sometimes we have to learn new programming language syntax fast. It doesn’t have to be a big pain – maybe we have to just visit this site: http://learnxinyminutes.com/. It contains very fast introduction to many programming languages with its syntax, commonly used methods or code blocks. It is a good, quick knowledge base to get started with new technology.