it does pretty much the same thing as these forums, notice i didnt use the [ ] around the word php, thats so that it wont show up as any code but i am aware of that.
this works fine ,but only will work for one peice of php code, (only one set of tags) and i know i have to use a loop but i am not good at loops, can someone tell me how plz? thx
one other thing, the page that it displays it on, the text is tiny, how come?
you don't need to open php tags (<?PHP), all you need is to put your php code between [ php ]and[ /php ] (without space) and it will put its own tags and highlght .
it's also safe to use htmlspecialchars() with it ..
__________________ PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
i dont want to use that, how do i loop what i have got
?
just wonder if this is a good way to thank for other's help..
if you know how your script works i'm sure you'll later find that the behaviour you get is what it's expected to be. without using regex to match several patterns, the script will involve more magic. i prefer nevermind's way. it's simple, effective, and efficient. what you do is like reinventing the wheel for preg_replace function. if you want to do so, just go into your php-sourcedir/ext/pcre/php_pcre.c and see how it works.
regards,
__________________
just an ignorant noob with moronic solution...
i didnt mean to be rude, but i did not ask for another method, i asked how to loop, i will try his method for sure, but does no one know how to loop my method??