Is there any utility, software or site that can examine my PHP files and re-arrange and make the codes tidy?
SEO Class in Chicago, IL
Learn How To Optimize Your Website on July 26, 2013
Looking for personalized in-depth SEO training among your peers?
High Rankings is offering a 1-day customized SEO training class in Chicago. Class size is limited so please sign-up now if you want in!
Are you a Google Analytics enthusiast?
Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE!

www.CustomReportSharing.com
From the folks who brought you High Rankings!
More SEO Content
International SEM | Social Media | Search Friendly Design | SEO | Paid Search / PPC | Seminars | Forum Threads | Q&A | Copywriting | Keyword Research | Web Analytics / Conversions | Blogging | Dynamic Sites | Linking | SEO Services | Site Architecture | Search Engine Spam | Wrap-ups | Business Issues | HRA Questions | Online Courses
Cleaning And Re-arranging The Php And Html Codes I
Started by
smartcard
, Feb 04 2005 02:08 PM
2 replies to this topic
#1
Posted 04 February 2005 - 02:08 PM
#2
Posted 04 February 2005 - 03:47 PM
Hey smartcard,
Short Answer: Not that I know of.
Long Answer: If you want to clean up the code produced in your site, the easiest way I can think of would be to create a static page "template" from it (just copy the source-code from your browser's view-source) and then clean that up:
1) Run template through HTML Tidy
2) Fix the errors reported
3) Repeat 1-2 until the page cleanly validates
4) Split the static HTML file back as it was originally in the PHP files.
As far a re-arranging the code, I am not sure what you mean. If you are referring to moving inline formatting & scripting to a .css file & .js file (respectively), then I would suggest checking out W3 School's CSS & JS tutorials, as that is covered there.
Phil
Short Answer: Not that I know of.
Long Answer: If you want to clean up the code produced in your site, the easiest way I can think of would be to create a static page "template" from it (just copy the source-code from your browser's view-source) and then clean that up:
1) Run template through HTML Tidy
2) Fix the errors reported
3) Repeat 1-2 until the page cleanly validates
4) Split the static HTML file back as it was originally in the PHP files.
As far a re-arranging the code, I am not sure what you mean. If you are referring to moving inline formatting & scripting to a .css file & .js file (respectively), then I would suggest checking out W3 School's CSS & JS tutorials, as that is covered there.
Phil
#3
Posted 05 February 2005 - 03:44 PM
Have you looked at smarty? http://smarty.php.net/
We are converting our shoppingsystem to smarty templates. It really separates the codes to different pages. You get another page to deal with but if the system is big it's worth it.
Now we have two pages:
item.php - Where all the php code and mysql request goes.
item.tpl - Where the html for the page is stored
It's great, one page for the developer, one for the designer and full control if something goes wrong.
Kristoffer
We are converting our shoppingsystem to smarty templates. It really separates the codes to different pages. You get another page to deal with but if the system is big it's worth it.
Now we have two pages:
item.php - Where all the php code and mysql request goes.
item.tpl - Where the html for the page is stored
It's great, one page for the developer, one for the designer and full control if something goes wrong.
Kristoffer
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users









