css - Terrible Layout - php and html/tables intermxed -


i working on project index.php file acts layout page , uses tables layout.

please have @ it's contents below. small part of code, there's more this.

i need pass on file front end developer/ designer change layout change code use css instead of tables layout. think mess , designer might have issues understanding , modifying this.

what's best way structure , organize code

1)the code becomes more cleaner, structured , organized.

2)it's easier designer understand , change layout.

<table width="770" border="0" cellspacing="0" cellpadding="0" align="center">    <tr><td colspan="3"><?php include("header.inc.php"); ?>        </td></tr>      <tr>       <?php     if ($xview == "main" || $show_sidebar_always)     {     ?>       <td width="185" id="sidebar_left" valign="top">          <table width="90%" class="buttons" cellpadding="0" align="center">          <tr>         <td>         <!-- begin version 5.0 -->         <a href="index.php?cityid=0"><?php echo $lang['home_link']; ?></a>         <!-- end version 5.0 -->         </td>         </tr>          <tr>         <td>         <a href="<?php echo $postlink; ?>"><?php echo $lang['post_link']; ?></a>         </td>         </tr>           <?php if($enable_calendar) { ?>         <tr>         <td>         <a href="<?php echo $posteventlink; ?>"><?php echo $lang['post_event_link']; ?></a>         </td>         </tr>         <?php } ?>          <?php if($enable_images) { ?>         <tr>         <td>         <a href="<?php echo $postimagelink; ?>"><?php echo $lang['post_img_link']; ?></a>         </td>         </tr>         <?php } ?>           <?php if($forum_dir) { ?>         <tr>         <td>         <a href="<?php echo $forum_dir; ?>" target="_blank"><?php echo $lang['forum_link']; ?></a>         </td>         </tr>         <?php } ?>         <tr>             <td>             <?php if($auth->id) { ?>             <a href="index.php?view=myaccount" title="">my account</a>             <a href="index.php?view=bookmarks" title="">watch list</a>              <a href="index.php?view=login&amp;logout" title="">logout</a>             <?php }else{ ?>             <a href="index.php?view=login" title="">login</a>             <a href="index.php?view=register" title="">sign up</a>             <?php } ?>             </td>         </tr>         </table>         <br> 

it better let designer create new layout , add php logic into. if rewrite suggest using template engine.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -