Color code php

Soldato
Joined
4 Jul 2004
Posts
2,647
Location
aberdeen
Hello
Is there a function to automatically make php appear colour coded, such as...
PHP:
<?php
$d1="2006-08-08";
$d2="2006-08-09";
$today=strtotime($d1); // first date
$yesday=strtotime($d2); // second 
$datet = getdate($today);
$datey = getdate($yesday);
$t1=$datet['yday'];
$t2=$datey['yday'];
echo $t0=$t2-$t1; // between my two dates will be '1 day'
echo "<br>".$tt=time()+($t0*86400); // in seconds

?>
 
does .phps work online or do you have to rename it - out of curiousity really.

Also, what does phps stand for?
 
MossyUK said:
does .phps work online or do you have to rename it - out of curiousity really.

Also, what does phps stand for?

You can't dynamically do it, if that's what you mean--the actual file.phps has to exist on the server.

PHPS = PHP Source.
 
By the way, you can also highlight a string from a PHP script using highlight_string() and highlight a file using highlight_file(). For example:

PHP:
<?php

highlight_string('<?php echo "foo"; ?>');

highlight_file('file.php');

?>
 
robmiller said:
By the way, you can also highlight a string from a PHP script using highlight_string() and highlight a file using highlight_file(). For example:

PHP:
<?php

highlight_string('<?php echo "foo"; ?>');

highlight_file('file.php');

?>
hi
thanks that was what i was after :D
 
Back
Top Bottom