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.

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\]

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

thanks for you both..
i will work on this and let you know...