The UBB label turns the PHP function of the HTML code

time:12-11-06 forum:PHP tools and code
  Reprinted from http://www.21andy.com/blog/20060915/427.html

[code].lt;? Php
function format_output ($output) {
/****************************************************************************
* N markup that is similar to HTML
****************************************************************************/

$output = htmlspecialchars (stripslashes); #91; p.#93;'.lt; p.gt; $output);

* bold */
$output = str_replace. Replace ('.#91; /i.#93;'.lt; /i.gt; $output);

/ * preformatted */
$output = str_replace. UT = str_replace ('.#91; /u.#93;'.lt; /u.gt; $output);

* indented blocks. T = ereg_replace ('.#91; anchor=.amp; quot;.#91;.#91; graph:.#93;.#93;).Amp; quot;.#93. T', $output);
$output = ereg_replace ('.#91; link=.amp; quot;.#91; graph:.#93;.#93;) .#93;.Amp; quot;.#93; ''.lt; div align=.quot; center.quot;.Gt;.Lt; img src=.quot.

prev:PHP implements HTML code to UBB Tags next:PHP completely filters HTML, JS, CSS and...
post comment
Notice



approved   What do you do with a baby crying ou...   39 years old as a girl! Takizawa Mak...   Have you ever eaten steamed pagoda f...   93 year old math professor returns t...   Good dad's 7 standards, all perfect!
rand   PHP import and export of Excel file ...      PHP filter special characters and SQ...   PHP gets all the pictures in the web...   PHP regularly gets the picture and d...
ads

other

Because all the contents of this site are reproduced from other media, the intention is to provide free services to the public, but it does not mean that this site agrees with its views, and can not be responsible for the authenticity of its verification, such as the copyright unit or individual of the manuscript does not want to publish on this site, please Contact me, I will immediately remove it, thank you. Contact: atseashawk@163.com