Jump to content

Archived

This topic is now archived and is closed to further replies.

GeorgeMoney

Examples

Recommended Posts

How do you make those "examples" like you see in many php things, like the comments are orange and strings are red and variables are blue and commands are green?

Is there a predefined function to do this? or do you have to use a script? if so can someone show me?


Sorry if this sounds a little stupid.


Thanks in advance!

Share this post


Link to post
Share on other sites
You can use highlight_string or highlight_file which will colour your PHP code, just the like forum does here:
[code=php:0]<?php

echo "hello world";

?>[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.