All writing

First PHP Project - Tournament Brackets

I mentioned on my twitter account that my very first project in PHP is used in production today, and I had a few people ask me what it was. So I thought I would show some examples of it in action. While I had done other things in PHP, this was the first time I had sat down and built someone by myself instead of just modifying someone else’s code. I built it for the very first time back in 2005, and since then have had to update it a few times. But it is still used regularly to host CEVO’s tournaments.

It basically is a system of managing a tournament bracket. Here is an example:

Example Tournament Brackets

Example Tournament Brackets

It basically is a PHP script that pulls from a database with key-value pairs. In a template file, in which you would create the bracket’s HTML, you would insert tags with an id. Then, depending on if you are viewing or editing it, it with either insert the value, or a input box used for changing the value.

There was a basic admin listing of the brackets that are active, as well as access to archived brackets:

Admin Panel

Admin Panel

You could add a new Bracket and select a template to use. When you select a template, it will show a preview of the template below.

Create a Bracket

Create a Bracket

Once you create a bracket, you can edit it. It isn’t pretty, but it gets the job done:

Editing a Bracket

Editing a Bracket

Here is an example of the finished product that I just created. If you want a better example, here is the recent League of Legends tournament bracket. While it isn’t pretty, it works. Some of the biggest problems with it is the editing and managing of the templates. You can only use some sort of WYSIWYG editor to be able to make sense of them, since they are a giant table. What that ends up leading to is template files with 2,000+ lines. It still amazes me this chunk of PHP code has been used over 1,000 times for different tournaments around the world.

One day we are going to rewrite the system to allow the end user to make their own templates, and more interaction & connectivity between the bracket and CTE (CEVO Tournament Engine). But until, my first real PHP project can continue to chug along just fine.

Sheet
A-3 · Detail
Drawn
Utah
Scale
1:1
Rev
2026