From the course: PHP: Exporting Data to Files
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Setting heading and paragraph styles - PHP Tutorial
From the course: PHP: Exporting Data to Files
Setting heading and paragraph styles
The whole idea of Rich Text Format, is that the text is formatted with fonts, colors, and spacing before and after elements. We've defined the margins and footer, now we need to create the main page styles. But before doing so, I think it's a good idea to bring a little bit of order into our script, by commenting it, so we know what's actually happening. So, after creating the PHPRtfLite object up here, we'll add in a couple of lines and then add a comment. The first thing we did, was to set the page properties. And then we added a footer, and then we can continue our script, at the end of the triblock, and the first thing we'll do is define fonts. We've already defined a font for the footer, and the way that we did that, was by creating a new instance of the PHPRtfLite font class. So, we can copy, that from line 15, and then paste it in down here three times. And then we can just edit it. Instead of font footer, the first one will be for the top level heading, so we'll call that font…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.