| |
|
-
March 26th 2012, 02:50 PM
#1
Registered User
PHP Style of Writing Codes
Hi everyone,
So, I'm new in PHP. I know that PHP is basically inline codes. However, from what I've seen, (and from experiences with ASP classic), sometimes coders would rather write all the functions before any of the html elements. And in the inline codes, they'll call the functions/variables.
e.g.
<?php $var = 'test'
.... codes codes functions functions...
?>
<div>
<?php echo $var ?>
</div>
or..
<div>
<?php echo 'test' ?>
</div>
which one is the better style?
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|
Web Hosting |
 |
|
|
Webmaster Links:
Social Media Marketing | Pay Per Click
|