PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
ziggy3000
Forum Contributor
Posts: 205 Joined: Fri Mar 23, 2007 3:04 pm
Post
by ziggy3000 » Wed Apr 25, 2007 5:41 pm
so it should be this?
Code: Select all
$code_count = preg_match_all( '#\[php\](.*?)\[\/php\]#si', $matches[1], $matches);
$matches[1]= hc( htmlspecialchars2($matches[1]));
return $matches[1];
}
ziggy3000
Forum Contributor
Posts: 205 Joined: Fri Mar 23, 2007 3:04 pm
Post
by ziggy3000 » Fri Apr 27, 2007 4:20 pm
it only echoing
Array 1
when i am telling it to parse other stuff
ziggy3000
Forum Contributor
Posts: 205 Joined: Fri Mar 23, 2007 3:04 pm
Post
by ziggy3000 » Sat May 12, 2007 11:36 am
since no one would REALLY help me in my bbcode function
, i searched on Google more, and found the solution my self!
the code is only 25 lines long, and it does whatever the pear version does!
ps. i didn't need preg_replace_callback()
John Cartwright
Site Admin
Posts: 11470 Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:
Post
by John Cartwright » Sat May 12, 2007 1:24 pm
Glad you got it.
P.S, this thread is 8 pages long, there is only so much patience someone has.
aaronhall
DevNet Resident
Posts: 1040 Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:
Post
by aaronhall » Sat May 12, 2007 1:38 pm
ziggy3000 wrote: i searched on Google more, and found the solution my self!
Wow, you would have saved yourself a lot of time had you done that in the first place.
ziggy3000
Forum Contributor
Posts: 205 Joined: Fri Mar 23, 2007 3:04 pm
Post
by ziggy3000 » Sat May 12, 2007 8:37 pm
i tried for a long time, and i read the comments and i found the answer in the comments!
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Thu May 17, 2007 10:41 am
If you are going to do that, why not just use GeSHi?
ziggy3000
Forum Contributor
Posts: 205 Joined: Fri Mar 23, 2007 3:04 pm
Post
by ziggy3000 » Thu May 17, 2007 9:25 pm
i think that geshi makes the whole page look awful. i prefer to use a highlighter like the built in php highlighter. if you know any other highlighters(NOT GESHI), please let me know
John Cartwright
Site Admin
Posts: 11470 Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:
Post
by John Cartwright » Thu May 17, 2007 9:26 pm
You realize that Geshi is extemely customizable?