Jump to content


Photo

bbcode help


  • Please log in to reply
3 replies to this topic

#1 bosniamaj

bosniamaj
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 28 August 2006 - 11:58 AM

I have similiar problem to this:
http://www.phpfreaks...c,105904.0.html

But I want to make smothing like this:
[ quote=someone][ quote=someoneelse][ quote=me]hi there[/quote]hi to you too[/quote]hi all[/quote]

to be like this:
[quote]someone says:
[quote]someoneelse says:
[quote]me say:
hi there[/quote]hi to you too[/quote]hi all[/quote]

I will use this for quote:
<div style='border: 1px solid #cccccc; margin: 5px 4px; padding: 2px; background-color: #e9e9e9; font-size: 11px;'>\\1 says: <br>\\2</div>


#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 28 August 2006 - 04:00 PM

Use the following as the reqaluar expression:
|\[quote=(.*)\](.*)\[/quote\]\]|is


#3 bosniamaj

bosniamaj
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 28 August 2006 - 07:24 PM

Can you please write the code?

I really can't do this. I tried many ways, but nothing :(

#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 29 August 2006 - 08:36 AM

$yourvar = preg_replace("|\[quote=(.*)\](.*)\[/quote\]\]|is",
"<div style='border: 1px solid #cccccc; margin: 5px 4px; padding: 2px; background-color: #e9e9e9; font-size: 11px;'>\\1 says: <br>\\2</div>",
$yourvar);





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users