Creates valid html code from PHP objects