Build timeline with PHP