|
PHP Resources -
Handy PHP Functions
|
|
Written by M. L. Griswold
|
|
Sunday, 03 September 2006 |
|
| Description: | | | string insert_tabs(int count) | | | | | | | This function can save you some time by automatically inserting tabs in your output. Adding tabs to your outputed HTML makes it much easier to read and as a result easier to debug if you have a problem. | | | | | | Function: | | | function insert_tabs($count=1){ // Function written by Marcus L. Griswold (vujsa) // Can be found at http://www.handyphp.com // Do not remove this header! for($x = 1; $x <= $count; $x++){ $output .= "\t"; } return $output; } | | | | | | Usage: | | | echo insert_tabs(3) . "Hello!"; | | | | | Result: | | | Hello! | | | | | Notes: | | | This is kind of self explanitory! |
Discuss this article on the forums. (1 posts)
|
|
Last Updated ( Thursday, 07 September 2006 )
|