// News / Replacement for NL2BR

Posted The: 20/05/2008 - AT: 19:49

The default nl2br function in php, works by inserting br tags before any newlines. This created a problem when posting code on Brugbart, since Brugbart uses pre tags around code Examples.

Custom Version

The custom version works by simply replacing the linebreaks with br tags, this is actualley an example from php.net, which i've found to work the best.

Futher testing is needed, you may report problems whith the corrent forum code, in comments to this post.

Example:

function LBD_nl2br($input) {
$order   = array("\r\n", "\n", "\r");
$replace = '<br />';
return str_replace($order, $replace, $input);
}

The above is how it currently works.

Brugbart to Launch new members content

Work is being done, to offer members their own mailing lists, this is useful when you can't administer your own list.

The forum is still in development, and should be finished whitin the next month or so, but again i can't promise anything, since i'm quite busy at the moment.

Reference Building

Our References are growing, please feel free to add your comments. Such would be how to change a given CSS property using javascript. Or about browser specific problems when using a paticuler tag or css property.

Brugbart Browser Support

People will find that Brugbart only works in IE7+, and most other modern browsers. Old browsers are not supported, and neither will they be. Users with IE6 and ealier, should atleast upgrade to IE7, or try another browser, such as: Safari, Firefox, or Opera.

Brugbart aim to support the most modern browsers, by following the standard, and test the website ageinst latest browser versions, also to report any potential problems that might accur.

Stumble It!

Author: BlueBoden

Comments: [0]

  1. HTML Tutorial
  2. CSS Tutorial
  3. XHTML Tutorial
  4. RSS Tutorial
  5. PHP Tutorial
  6. htaccess Tutorial
  7. Server Tutorial

Checked At:09:24

5 Guests

0 Users

Online doing the past 15 Minutes!

PageRanking.dk - Flere hits og højere PageRank - GRATIS tilmelding!

This page was created in 0.0986580848694 seconds

Welcome Guest