First post…

First post…

  <pre lang="LANGUAGE" line="1">...

The line="1" argument is optional, but will add line numbers to your syntax.

Example 1 (with line-numbers):

1
2
3
4
5
6
<?php
 function greeting($var = false) {
   ($var ? return 'Hello World!' : return 'Goodbye World!');
 }
 echo greeting(true); //will print Hello World!
?>

Example 2 (without line-numbers):

<?php
 function greeting($var = false) {
   ($var ? return 'Hello World!' : return 'Goodbye World!');
 }
 echo greeting(); //will print Goodbye World!
?>

I’m not entirely sure how to include <pre>...</pre> blocks within the syntax. If anyone can figure it out let me know.

Thanks to the wp-syntax plugin.

Tags: , ,

Tristan Waddington

I'm currently a senior studying public relations in the UO School of Journalism and Communication. I've been a student web developer at EMU Marketing since summer 2007.

Leave a Reply