|
|
|
|
Joined: Aug 2000
Posts: 262
Enthusiast
|
|
Enthusiast
Joined: Aug 2000
Posts: 262 |
okey i wanna do and display the php code, my question is how do i figure out what is between the so i can convert it to use highlight_string ? [:red]-------------- http://extremeforums.org
|
|
|
|
|
Joined: Aug 2000
Posts: 262
Enthusiast
|
|
Enthusiast
Joined: Aug 2000
Posts: 262 |
nevermind, i was doing it on the wrong place. okey now, anyone know php out there. i wanna do $Body = eregi_replace("\[code\](.*)\[/code\]","\\1",$Body); and then do a highlight_string(\\1); or something like that? can i do something like that? i want to be able to pull what is between [code][/code] and run it throught the highligh_string function.? [:red]-------------- http://extremeforums.orgEdited by poil on 03/23/01 02:50 PM.
|
|
|
|
|
Joined: May 1999
Posts: 3,039
Guru
|
|
Guru
Joined: May 1999
Posts: 3,039 |
There probably is a bit short way to do this, but here is how it could be done. As for the actual regex, you might want to take a look at the markup functions if you can't get that part to work.
// Declaring an array before hand $piece[0] = "";
// Grab the bit you are looking for preg_match("/pattern_to_look_for/", $stringtosearch, $piece);
// Call your function passing the bit stored in the array. highlight_strng($piece[1]);
UBB.threads Developer
|
|
|
|
|
Joined: Oct 2001
Posts: 30
Junior Member
|
|
Junior Member
Joined: Oct 2001
Posts: 30 |
Does anyone know how this may work on 6.3, If so, Can you please shed some light on this subject.
Thanks,
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 5,834
Joined: January 2000
|
|
|
Forums63
Topics37,583
Posts293,957
Members13,826
| |
Most Online151,614 Nov 14th, 2025
|
|
Currently Online 2217
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 28
|
|
|
|
|
|