Friday, July 3, 2009

10 Super PHP codes to handle HTML (for Web Developers)

Today I would like to share some interesting PHP codes to handle HTML dynamically. These codes are free to use under GNU General Public License. I hope this post would help Web Developers. Here's the following:

1. Object HTML

A set of classes that will allow you to build HTML documents completely w/ objects in PHP. This is only the most basic layer but it is easy to build onto.

Download Now

2. OO HTML Table Generation

Automatic generation of HTML for table.
- Colspan, rowspan, table style, column style, cell style, and data style may all be defined.
- OO interface
- Simple but effective

Download Now

3. HTML Table Tag Analysis

Helpful for debugging bad HTML code. This program counts the number of opening table tags and how many imbedded tables exist.

Download Now

4. PREV_123_NEXT function

The logic of this function is based on the prev123next code snippet, but rewritten to return an array of links that can then be ouput anywhere on the page. Also added some boundry checking for the offset variable.

Download Now

5. PHP function for cleaning up HTML and JavaSctipt code

This is a function for PHP scripts to clean up HTML code before outputting it. The function applies correct indentation to HTML/XHTML 1.0 and JavaScript and makes the output much more readable. You can specify the wanted indentation through the variable $indent

Download Now

6. Breadcrumbs Navigation

This code will produce a useful navigation resource, showing visitors where they are in your site. This form of navigation is recommended by Jakob Nielson, and it really does make navigation less confusing.

Download Now

7. Use content from another site

This short script lets you take content from another page and embed it into your own pages. Just put the URL of the page who's contents you would like and then in the start and finish lines, find something in the original source code that you can use to mark the start and finish cut points.

Download Now

8. Dynamic List Boxes

Two listboxes filled up with data from two related tables. As the user selects the first listbox, the second listbox changes accordingly.

This code uses mySQL and PHP as well as Javascript. The example tables will be automatically created for you but you have supply the correct database parameters..

Download Now

9. Display MySQL restult as table

Take a row from a table of images and display thumbnails x number across. Just change the value of $tds to change how many it shows across the row.

Download Now

10. Url to Hyperlink

This function trasforms a string (or a text) to an hyperlink.

Example: My site is http://www.lolloland.com will be trasformed to: my site is <a href="http://www.lolloland.com"; target="TARGET">www.lolloland.com</a>.

This function replaces a http, https or www in a text with a html A tag.

Download Now

Do you have any opinion, Leave a comment.

Related Posts :





14 comments :

Anonymous said...

I'm sure that the code does what it says, but after looking at it, the above code, all of it, really need to be reworked.

Anonymous said...

After looking at the first snippet, I decided to forgo your method: it uses too many objects. All you need is simple logic to handle most types of elements, and subclassing *only* for something as different as a <select> box. My own tag builder is only 126 lines with an included form builder....

zariat said...

this looks really useful! i have my own versions of some of these, but it' useful to compare techniques also.

another useful one to include is a simple http redirect. now with everyone having alternate URLS at facebook, twitter, and other network, it's useful to have yourname.com/facebook etc.

i wrote a quick tutorial on this, with simple cut-paste code, on my blog:

http://zariat.com/z/2009/05/17/diy-link-shortening-for-your-networks/

cheers
zariat

web design kent said...

Breadcrumb and displaying content from other sites will be useful. Thanks for the post.

Marco Nae said...

Thanks for the post. It would be better if there would be a documentation for the code available - in my opinion.

I find HTML cleaner interesting

Web Design Mumbai said...

wow, looks cool.

thanks for the list.

Simon said...

Good work, I would also add IzzyMenu.com, as a great tool for creating dynamic html menus

Carl said...

tag as object also worth a try.
thanks for the list !

Anonymous said...

thanks for sharing your site. there are lots of ebooks are available here

http://feboook.blogspot.com

Anonymous said...

Thanks a lot. It can be usefull for me after php tutorials

benivolent said...

Realy very good ten HTML codes for web developers. Thanks for the post

Web Development Company said...

Something long but really informative and also helpful.

Anonymous said...

This is an excellent site and tips are so brilliant..Very useful information is shared with great points.Helped me lot.Thanks for presenting.
best web design company

Anna Schafer said...

A set of classes that will allow you to build HTML documents completely w/ objects in PHP. This is only the most basic layer but it is easy to build onto.html coder

Post a Comment

 

Copyright © 2009 - tutorialfeed.org