Jump to content

To Echo, Yes Or No


jimfog

Recommended Posts

I have created with html a calendar and i have assigned to a php variable which in turn is called using echo in the main script(inex.php) of the web app. The question is if the above is the most efficient way to code, is it maybe better not to assign the markup in a php variable and just write the html directly in index.php. I want to insert some javascript to the table cells and and since these are contained in a php variable the whole thing gets messy. Having to escape all of these characters becomes cumbersome.

Link to comment
Share on other sites

you can seprate the html with php which will be cleaner and easy to maintain. i would do like this...a seprate file for calender class where only data will be manupulated no any mark ups. and one file for visual display and controling the strcuture. in index.php creating the template for calender and then using the methods and attributes in that template.

Link to comment
Share on other sites

Am i going to place the markup in this file that controls the visual display? Is it possible to create the calendar dynamically, using php, a table, or some html(tbody, td, etc) is inevitable? I think html is inevitable, at least in this visual display file .

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...