Location: PHPKode > projects > bloggeruniverse > includes/functions.php
<?php
function microtime_float()
{
   list($usec, $sec) = explode(" ", microtime());
   return ((float)$usec + (float)$sec);
}

function BBCode ($string) {
$search = array(
    '@\[(?i)b\](.*?)\[/(?i)b\]@si',
    '@\[(?i)i\](.*?)\[/(?i)i\]@si',
    '@\[(?i)u\](.*?)\[/(?i)u\]@si',
    '@\[(?i)img\](.*?)\[/(?i)img\]@si',
    '@\[(?i)url=(.*?)\](.*?)\[/(?i)url\]@si',
	'@\[(?i)url\](.*?)\[/(?i)url\]@si',
    '@\[(?i)code\](.*?)\[/(?i)code\]@si'
);
$replace = array(
    '<b>\\1</b>',
    '<i>\\1</i>',
    '<u>\\1</u>',
    '<img border="0" src="\\1">',
    '<a href="\\1">\\2</a>',
	'<a href="\\1">\\1</a>',
    '<code>\\1</code>'
);
return preg_replace($search , $replace, $string);
}
?>
Return current item: bloggeruniverse