YAML data file Web Data


show more Creating a YAML data file provides you with in-depth training on Developer. Taught by Joseph Lowery as part of the Working with Data on the Web show less
please wait ...

Creating a YAML data file

In earlier chapters, I showed you how to take form values entered online and save them in a specific format like CSV, XML, and JSON. want to see how to do it in (UNKNOWN) and PHP? Who wouldn't? Lets keep going. Well, I've got index.php from the chapter 5, 05_02 folder now open in my code editor. Again, there's a form on the page and it's down around line 40 there. That asks for name, email, date of birth and some other data.

However, the code we'll be using is not form specific, so it can be used with most, if not all forms. Let's head back up to the top of the page and bring in our PHP. So, I'll start with a PHP code block. Now, the very first line of code that I'm going to bring in is an include. And it's an include that I've found is the easiest way to output YAML code. It's done with a special PHP class called, Spice.

I'm assuming that's how you pronounce it anyway. What makes it simple is that all you need to do is to include the spice.php file, and ...

Creating a YAML data file
Video duration: 6m 21s 2h 21m Intermediate

Viewers:

Creating a YAML data file provides you with in-depth training on Developer. Taught by Joseph Lowery as part of the Working with Data on the Web

Subjects:
Developer Web
Software:
HTML XML CSS JSON YAML
Author:
please wait ...