fixing xpand template for php