MySQL_Narb Posted June 24, 2012 Share Posted June 24, 2012 ?> <dt> </dt> <dt><span class="newsdate"><?php echo $news[0]['date']; ?></span><?php echo $data[0]['title']; if(acc_status(getUsername()) > 2) echo '<a href="acp.php?edit='. $row['id'] .'"> [Edit]</a>'; ?></dt> <dd> <table width="100%"><tr> <td style="text-align: justify; vertical-align: top;"><?php echo stripslashes(shorten($row['content'], 150)); ?></td> <td style="padding-left: 1em; text-align: right; vertical-align: top;"> <?php echo $img; ?> </td></tr></table> <div style="margin-top: 0.5em;"><a href="news/newsarticle.php?id=<?php echo $row['id']; ?>">Read more...</a></div> </dd> <?php or if it was actually in the PHP using echo instead? Quote Link to comment https://forums.phpfreaks.com/topic/264679-what-do-you-consider-neater/ Share on other sites More sharing options...
requinix Posted June 24, 2012 Share Posted June 24, 2012 I prefer that. If it's outside the PHP tags then the IDE can analyze the HTML (syntax highlighting, errors and warnings, autocomplete, etc). Personally I'd even put that one you echo as HTML too. </pre> <dt> 2) { ?> [Edit] Quote Link to comment https://forums.phpfreaks.com/topic/264679-what-do-you-consider-neater/#findComment-1356523 Share on other sites More sharing options...
MySQL_Narb Posted June 24, 2012 Author Share Posted June 24, 2012 I prefer that. If it's outside the PHP tags then the IDE can analyze the HTML (syntax highlighting, errors and warnings, autocomplete, etc). Personally I'd even put that one <a> you echo as HTML too. <dt><span class="newsdate"><?php echo $news[0]['date']; ?></span><?php echo $data[0]['title']; if(acc_status(getUsername()) > 2) { ?> <a href="acp.php?edit=<?php echo $row['id']; ?>"> [Edit]</a> <?php } ?></dt> Thanks for the reply. Quote Link to comment https://forums.phpfreaks.com/topic/264679-what-do-you-consider-neater/#findComment-1356528 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.