Cface Posted December 15, 2009 Share Posted December 15, 2009 I really hope someone can help me out! Maybe i'll learn a thing or two. So i got ahold of this bbcode2html parser (attached below). It works fine and all when you run only one variable through it, but when i try to run two or more only one shows up, and not where it should show up on the page. Here's what i tried doing in getting it to work with two variables. This goes on main page. <?php require_once('access/blocks/parser/parser.php'); $parser = new parser; $parsed = $parser->p($text, 1 . $text2, 1); // default is $parsed = $parser->p($text, 1); 1 being an argument. echo $parsed; ?> Then i broke up the main page into sections (i.e. news.php, nav.php, shoutbox.php, etc) using the include method and put this bit of code on each page, changing var to $text2, $text3, etc. on the different pages: <?php $text = "[url=index.php]link 1[/url] [url=link2.php]link 2[/url]"; ?> It works fine when i'm just using one $text variable but when i use two or more it farts up. This is what happened on a test site when i tried running two vars. It ignored $text2 and threw $text one all the way out of whack on top, nowhere near where i placed the include. This otherwise works, great running one $text... Anyone have any ideas? Please PHP guru's show me the error of my ways! Much obliged, Frank [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/185193-help-processing-two-or-more-variables-in-one-variable-please/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.