PHP Question: Printing A Boolean Value


What will the following code print, and why?

  1. echo TRUE;
philipnorton42 Fri, 04/08/2011 - 11:33
Displaying Wordpress Authors

Wordpress has a couple of rarely used functions that allow author information to be displayed for the current post and a list of all of the authors on the blog.

Adding a written by message to your posts is not difficult at all. Just use the the_author_posts_link() function inside the post loop.

philipnorton42 Thu, 02/26/2009 - 10:50

Write To The Output Buffer In PHP

10th February 2009

The first thing you learn about in PHP is probably how to print something. This is usually done with a call to the echo or print, but there is another way to print things by writing content directly to the output buffer. The following code looks like you are writing to a file, but the text will appear in the browser window because we are writing to the php://output output stream.

Highlight Code In PHP

When printing off source code there is a handy function that will parse the code and produce nice looking syntax highlighted code. There are actually two functions you can use. The highlight_string() function takes a string as a parameter and will print the highlighted code. The highlight_file() function takes a file name as a parameter, the contents of which are printed off with highlighted syntax. For now I will concentrate on the highlight_string() function, but the output of these two functions is the same.

philipnorton42 Sat, 01/12/2008 - 19:54