preg issue
Posted: Sat Feb 07, 2004 3:05 pm
i have a quote set up i made that replaces the blockquote of html that's been deprecated. issue is that the preg replacement doesn't work on nested quotes. not quite sure why. if anyone can tell me why and help me fix it, i would appreciate that.current php preg search:[php # add quotes
$postcode=preg_replace('|\[/quote]|i', '<hr /></div>', $postcode);
$postcode=preg_replace('|\[quote(=(.*))(?U)]|i', '<div class="quote">Quote \2<hr />', $postcode);result can bee seen in this thread:http://www.findyourdesire.com/forums.php?fid=4&tid=13 (currently the last post has got a nested one)
thanx in advance for the help
ps- an aside. i have something else i'm doing and using sessions there. just as question since i'm not used to sessions, is my understanding that any session variable that gets registered i can access via $variable instead of $_SESSION['variable']?
$postcode=preg_replace('|\[/quote]|i', '<hr /></div>', $postcode);
$postcode=preg_replace('|\[quote(=(.*))(?U)]|i', '<div class="quote">Quote \2<hr />', $postcode);result can bee seen in this thread:http://www.findyourdesire.com/forums.php?fid=4&tid=13 (currently the last post has got a nested one)
thanx in advance for the help
ps- an aside. i have something else i'm doing and using sessions there. just as question since i'm not used to sessions, is my understanding that any session variable that gets registered i can access via $variable instead of $_SESSION['variable']?