|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
string highlighting
I'm working on my personal site and came across a problem. I have a tutorial section that will contain PHP tuts. Obvisioualy it contain PHP code. I want that code the syntax highlighted. So I'm placing all code in <span class="php">..code..</span> so I want to make a regex that will get that code from inside that tag and do a highlight_string() on it or something. I'm storing the tuts in a db with all the tuts HTML.
Thanks guys. |
|
#2
|
|||
|
|||
|
How about (completely untested):
<span class=\"php\">.*?</span> Hadley |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > string highlighting |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|