Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



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!



Photo
- - - - -

Cleaning And Re-arranging The Php And Html Codes I


  • Please log in to reply
2 replies to this topic

#1 smartcard

smartcard

    HR 2

  • Active Members
  • PipPip
  • 22 posts

Posted 04 February 2005 - 02:08 PM

Is there any utility, software or site that can examine my PHP files and re-arrange and make the codes tidy?

#2 Googlewhacked

Googlewhacked

    Got geek?

  • Active Members
  • PipPipPipPipPip
  • 348 posts
  • Location:Florida: The Plywood State

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

#3 Crifer

Crifer

    HR 3

  • Active Members
  • PipPipPip
  • 70 posts
  • Location:Sweden

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users