Re: mixing HTML and PHP code

From: Date: Fri, 12 Jan 2001 21:39:18 +0000
Subject: Re: mixing HTML and PHP code
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-34300@lists.php.net to get a copy of this message
In Dreamtime, we'd just have a template that looks like this: <table> {:each:output} <tr> <td>{output}</td><td>{more_output}</td> </tr> {:next:more_output} {:end} </table> Even a pot-smoking mac-using hippie web designer can understand that. :-) And it's readable in Dreamweaver or GoLive or any of those visual HTML tools. For Dreamweaver I added a little custom definition that makes a nice icon wherever it sees a template tag in the HTML file. ...and our PHP geeks just stuff a results array into the template. Too easy. - Tim http://www.phptemplates.org > <TABLE> > <? > while (fetch_row_from_query()){ > $output = data_from_fetched_row(); > $more_output = more_data_from_fetched_row();?> > <TR> > <TD><?echo $output?></TD> > <TD><?echo $more_output?></TD> > </TR> > <?}?> > </TABLE>

« previous php.general (#34300) next »