Previous Thread
Next Thread
Print Thread
Rate Thread
#209313 03/23/2001 2:45 PM
Joined: Aug 2000
Posts: 262
Enthusiast
Enthusiast
Offline
Joined: Aug 2000
Posts: 262
okey i wanna do
Code
insert php code here
and display the php code, my question is how do i figure out what is between the
Code
 and the 
so i can convert it to use highlight_string ?

[:red]--------------
http://extremeforums.org

Sponsored Links
vent #209314 03/23/2001 3:44 PM
Joined: Aug 2000
Posts: 262
Enthusiast
Enthusiast
Offline
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.org

Edited by poil on 03/23/01 02:50 PM.


vent #209315 03/23/2001 8:35 PM
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
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
Sally #209316 07/28/2003 1:36 PM
Joined: Oct 2001
Posts: 30
Junior Member
Junior Member
Offline
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,


Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
• Shock Hosting
• Stable Host
• bluehost
• InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,080
Joined: March 2000
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,826
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 2916
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 18
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)