The Bigger Function

Let's look at the function outside of the script and figure out how it works.

provided by: 
Originally published at Internet.com


Around the Script in 80 Tips...

Last week we hit upon the doit() function. That function is actually sitting inside of a larger function named DelHTML(). You can probably guess that the name is shorthand for "Delete HTML". Today we'll figure out how it works and wrap this script up.

The Script's Effect

-----------------------------------

Here's the Code

As always, it's easier to understand these functions and scripts if you understand the overriding reason for their existence. What does the author want this function to do?

The purpose of the script is to eliminate all of the HTML tags and return just the text. That's not that hard of a job because we know that every tag begins with < and ends with >. So we need to create a function that will look for < and > and return to use everything except those characters and what is inside them.

The process must take place time and time again in order to eliminate all tags. First you eliminate the first html tag, then return all the leftover text and work on it eliminating the next tag. Then you return all of the remaining text and work on that eliminating the next tag. It goes on until all the tags are gone...

Read article at Internet.com site
Related Articles
- Validating Date Entries in Forms
You may wonder how you can ever perform data entry validation for dates in forms. The problem is not so much in the calculations as it is in the wide variety of acceptable date formats around the world.
- Drop-down Display
- Headline Script
- Functions in PHP
- The Scrolling Functions
- The Next and Previous Buttons
- Third password tutorial
- Do the Search
- Replace the Space With a (+)
- Create the Clock
Regional Articles
- The Bigger Function Alabama
- The Bigger Function Alaska
- The Bigger Function Arizona
- The Bigger Function Arkansas
- The Bigger Function California
- The Bigger Function Colorado
- The Bigger Function Connecticut
- The Bigger Function DC
- The Bigger Function Delaware
- The Bigger Function Florida
- The Bigger Function Georgia
- The Bigger Function Hawaii
- The Bigger Function Idaho
- The Bigger Function Illinois
- The Bigger Function Indiana
- The Bigger Function Iowa
- The Bigger Function Kansas
- The Bigger Function Kentucky
- The Bigger Function Louisiana
- The Bigger Function Maine
- The Bigger Function Maryland
- The Bigger Function Massachusetts
- The Bigger Function Michigan
- The Bigger Function Minnesota
- The Bigger Function Mississippi
- The Bigger Function Missouri
- The Bigger Function Montana
- The Bigger Function Nebraska
- The Bigger Function Nevada
- The Bigger Function New Hampshire
- The Bigger Function New Jersey
- The Bigger Function New Mexico
- The Bigger Function New York
- The Bigger Function North Carolina
- The Bigger Function North Dakota
- The Bigger Function Ohio
- The Bigger Function Oklahoma
- The Bigger Function Oregon
- The Bigger Function Pennsylvania
- The Bigger Function Rhode Island
- The Bigger Function South Carolina
- The Bigger Function South Dakota
- The Bigger Function Tennessee
- The Bigger Function Texas
- The Bigger Function Utah
- The Bigger Function Vermont
- The Bigger Function Virginia
- The Bigger Function Washington
- The Bigger Function West Virginia
- The Bigger Function Wisconsin
- The Bigger Function Wyoming
Related Articles
- Validating Date Entries in Forms
You may wonder how you can ever perform data entry validation for dates in forms. The problem is not so much in the calculations as it is in the wide variety of acceptable date formats around the world.
- Drop-down Display
- Headline Script
- Functions in PHP
- The Scrolling Functions
- The Next and Previous Buttons
- Third password tutorial
- Do the Search
- Replace the Space With a (+)
- Create the Clock

Rss   Delicious   Digg   Add To My Yahoo   Add To My Google   Bookmark   Search Plugin

Topics:
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML