PHP Colorizator

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

Post Reply
argyle
Forum Newbie
Posts: 3
Joined: Sun Mar 26, 2006 5:05 pm

PHP Colorizator

Post by argyle »

Is there any way to get the source for the markup engine for the "php" tags? I'd like to generate the same markup for some of my code. Something akin to:

Code: Select all

// Comment

function thisFunction($params){
$variableName = new Variable($params);

for ($c = 0; $c < 10; $c++) {

echo "Some string";

}

return 10;

}
Basically, some php code to automatically do what I did above.

- jake
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

http://php.net/highlight_file
http://php.net/highlight_string

;)

EDIT | I assume you meant highlighting? Upon re-reading your post I'm not so sure now.
argyle
Forum Newbie
Posts: 3
Joined: Sun Mar 26, 2006 5:05 pm

Post by argyle »

Haha, thanks, I was just starting to write the regex to do this...

Boy, those guys at php.net are taking all the fun out of being a CS major.. :wink:
Post Reply