It is possible to load different styles on a page if certain factors exist. Now, I am not going to try to confuse you any more and I am just going to jump into some code. <link src="some Styles.css" media="screen" /> The important part of this is the media attribute. I am sure you all [...]
Continue Reading...
Another snippet from my library. This I have actually found useful several times in the past. It looks for HEX color values in a string and colorizes them. function format_hex_color($t) { $t = preg_replace("#(\#[0-9A-Fa-f]{6})#si", "<span style=’color:\\1′>\\1</span>", $t); return $t; } Example usage $string = "He wanted it in #ff0000 or #00FFAA."; $string = format_hex_color($string); [...]
Continue Reading...
To test out my new syntax highlighting plugin, I’m going to post a shorthand way of doing an echo in PHP. A typical echo is… <?php echo $variable; ?> And the shorthand method that I almost always use… <?=$variable?>
Continue Reading...