PHP Resources
Home
Books
Directories
Magazines
Non-English Sites
Online Communities
Tools
Tutorials and Articles
Web Hosting
PHP Functions
PHP News Groups *
PHP Reference
Smarty Reference
Pear Reference
PHP-GTK Reference

By submitting PHP Resources you own, or know of, you'll help us build the largest PHP Resource website on the net. Please double check that your resource doesn't already exist before you submit it!!. We thank you for helping make this a better website.









Resource Image Newest ResourcesPopular ResourcesTop Resources Resource Image
PHP Resources
{strip}

{strip}

Many times web designers run into the issue where white space and carriage returns affect the output of the rendered HTML (browser "features"), so you must run all your tags together in the template to get the desired results. This usually ends up in unreadable or unmanageable templates.

Anything within {strip}{/strip} tags are stripped of the extra spaces or carriage returns at the beginnings and ends of the lines before they are displayed. This way you can keep your templates readable, and not worry about extra white space causing problems.

Note: {strip}{/strip} does not affect the contents of template variables, see the strip modifier instead.

Example 7-44. {strip} tags

{* the following will be all run into one line upon output *}
{strip}
<table border='0'>
 <tr>
  <td>
   <a class="blue" HREF="res_{$url}">
    <font color="red">This is a test</font>
   </a>
  </td>
 </tr>
</table>
{/strip}

The above example will output:

<table border='0'><tr><td><a class="blue" HREF="res_http://. snipped...</a></td></tr></table>

Notice that in the above example, all the lines begin and end with HTML tags. Be aware that all the lines are run together. If you have plain text at the beginning or end of any line, they will be run together, and may not be desired results.

See also the strip modifier.





Featured




Featured
PHP Code Examples
web site templates
Learn PHP playing Trivia
PHP & MySQL Forums
Web Development Index

List Your ResourceUpdate Your Resource

Copyright © 2006 - 2008 MickMel Inc