PHPBuilder - nbsp() - Replace whitespace with "nbsp;"



RSS Twitter
Snippets Html

nbsp() - Replace whitespace with "nbsp;"

by: Thomas Klopf
|
July 31, 2002

Version: 1

Type: Function

Category: HTML

License: GNU General Public License

Description: If you are getting ugly tables because of strings getting split into two lines, us this to turn your whitespace into nbsp; to prevent new lines.



function nbsp($string)
{
  $new_string = ereg_replace(" ", " ", $string);
  return $new_string;
}

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Thomas Klopf

Comment:



Comment:

(Maximum characters: 1200). You have characters left.