-1

Good Morning All..

How to do coding for code tags , when we post a thread..And the display the content between the code tags with different color using PHP..

Thanks in Advance.

Shanti.

3
Contributors
3
Replies
5
Views
8 Years
Discussion Span
Last Post by Shanti C
0

I dont know the actual method but I think following may work.

str_replace("code","<span style='your style'>",$yourtext);
str_replace("/code","</span>",$yourtext);

You mus use full tag in your code i.e. \[code\]

0

Have look at this article of what you can do with out any additional tools/libraries/plugins. However if you after tool you may consider GeSHi (I think dani use it here or she use it in past) or check result of this search and perhaps you find something for your self

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.