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
nwp
Forum Contributor
Posts: 105 Joined: Sun Feb 04, 2007 12:25 pm
Post
by nwp » Fri Mar 09, 2007 9:33 pm
highlight_string() Prints the highlighted string but i wanna do like this
e.g. $str will hold the formated HTML
AKA Panama Jack
Forum Regular
Posts: 878 Joined: Mon Nov 14, 2005 4:21 pm
Post
by AKA Panama Jack » Fri Mar 09, 2007 9:38 pm
nwp wrote: highlight_string() Prints the highlighted string but i wanna do like this
e.g. $str will hold the formated HTML
You might want to check the PHP documentation.
Code: Select all
$str = highlight_string($line, true);
aaronhall
DevNet Resident
Posts: 1040 Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:
Post
by aaronhall » Fri Mar 09, 2007 9:38 pm
The
manual entry provides some valuable insight
(Hint: look at the second, optional parameter)
edit: too quick on your feet, panama jack
nwp
Forum Contributor
Posts: 105 Joined: Sun Feb 04, 2007 12:25 pm
Post
by nwp » Sat Mar 10, 2007 3:59 am
OK Thanks It working with true argument. But ho wcan I highlight HTML sorce code
aaronhall
DevNet Resident
Posts: 1040 Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:
Post
by aaronhall » Sun Mar 11, 2007 5:35 am
There is no built-in PHP function, but you could try a third party syntax highlighter like Geshi.
nwp
Forum Contributor
Posts: 105 Joined: Sun Feb 04, 2007 12:25 pm
Post
by nwp » Sun Mar 11, 2007 8:19 am
aaronhall wrote: There is no built-in PHP function, but you could try a third party syntax highlighter like Geshi.
Whats Geshi ??
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Sun Mar 11, 2007 9:01 am
Google it.