Look how gross this is. You can barely even read it:
	
	
	
		
It wouldn't be too hard to change the background to white or something, would it? :bowdown:
	
		
			
		
		
	
				
			
		PHP:
	
	<?php
function bbPage1($str)
{
    preg_match_all('/\[page\](.+?)\[\/page\]/ims', $str, $matches);
    $i = 0;
    foreach($matches as $key=>$val)
    {
        $str = preg_replace('/\[page\](.+?)\[\/page\]/ims', '[PAGE:' . $i . ']$1[/PAGE:' . $i . ']', $str, 1);
        $i++;
    }
    return $str;
}
/*
$str = '[PAGE]hey, baby.[/PAGE][PAGE]oh, hi.[/PAGE]';
echo $str . '<br /><br />';
$str = bbPage1($str);
echo $str;*/
function bbQuote($str){
    $str = preg_replace('/\[quote\](.+?)\[\/quote\]/ims', '<div class="quotebox">$1</div>', $str, 1);
    $str = preg_replace('/\[quote=(.+?)\](.+?)\[\/quote\]/ims', '<div class="quotebox"><div class="quotespeaker">Quote: Originally said by: $1</div>$2</div>', $str, 1);
    
    $prev = '';
    while ($prev != $str) {
        $prev = $str;
        $str = preg_replace('#\[quote\](.*?)\[/quote\]#si', '<blockquote><div><strong>Quote</strong><br />$1</div></blockquote>', $str);
        
    }
    
    return $str;
}
    
$str = '[quote]Hi.[quote]hi![/quote]hi[/quote]';
echo $str . '<br />';
$str = bbQuote($str);
echo $str;
?>It wouldn't be too hard to change the background to white or something, would it? :bowdown:
 
	 
	 
 
		 
 
		 
 
		
 
 
		