[ Previous: II.B. Installation | Next: B. How a Typical NBBC Program Works ]
NBBC is designed to be very easy to use, even for the most meager of PHP programmers. Let's try creating your first program that parses BBCode. Create a new file in your project directory, named "hello.php", and use your favorite text editor to put this very simple PHP program in it:
Let's look at what this does. First, the require_once directive adds NBBC to your program. Next, new BBCode creates a new BBCode parser object and sets it up to be ready for performing parsing. The new BBCode object is then stored in the variable $bbcode. Finally, the big one... we ask the BBCode object to convert some BBCode text to HTML, and we print the result.
[ Previous: II.B. Installation | Next: B. How a Typical NBBC Program Works ]