Pyh.conf’25: a new PHP conference for the Russian-speaking community

Voting

: max(four, zero)?
(Example: nine)

The Note You're Voting On

Eric
5 years ago
To change the style directly from a CSS file, it is recommended to only go through classes instead of hard-coding it.

<?php

$functions
= array("default", "html", "keyword", "string", "comment");

foreach (
$functions as $value) {
ini_set("highlight.$value", "highlight-$value;");
}

?>

And in the CSS file (for example) :

.highlight-html { color: #000000; }
.highlight-default { color: #0000bb; }
.highlight-keyword { color: #007700; font-weight: bold; }
.highlight-string { color: #dd0000; }
.highlight-comment { color: #ff8000; }

<< Back to user notes page

To Top