PDA

View Full Version : PHP help please.



MrCraig
07-11-2007, 08:36 PM
Okay, im using a BB code script that tomm helped me with (thanks dude) However, it only applies the code if there are no new lines in between it

for example




Bla
Bla



Wont work..

The code is as follows:



<?php
$str = preg_replace('#\[align=(.*?)\](.*?)\[/align\]#i','<div align="$1">$2</div>',$str);
return $str;
?>


Any help please?

QuickScriptz
08-11-2007, 12:27 PM
Hm.... I think I made something similar not too long ago for my dj panel.... I can't access the file right now but I will check later and get back to you :)

MrCraig
08-11-2007, 03:50 PM
Ty :)

+ REP if i can =]

EDIT: Gotta spread..

Want to hide these adverts? Register an account for free!