fill data into a html template like smarty in php