Join Kevin Skoglund for an in-depth discussion in this video Convert to and from metric speed, part of Easy PHP Projects: Measurement Conversion.
- In this movie, we'll write all the code that we need…for converting measurements of speed.…The first thing that we'll do to get started…is create the page that we're going to use…for conversions that has the form on it…that we submit.…And I'm going to do that by copying…one of the recent ones we've been working with.…I'm using a recent one because I want to make sure…I get our latest improvements to the code there…which some of those files might not have yet.…I'm going to duplicate that file,…and I'm going to rename it…to be speed.php.…And then you can open it up in your text editor.…For me, it automatically opens inside TextMate here.…
And you can see that I already have a spot…in my index.php file to link to it.…So I'll have a big button that I can click on.…It'll take me to speed.php…which is a form that we submit.…Now let's go through here…and let's make the changes we need…to make this work for speed.…Instead of convert_mass,…we're going to have convert_speed.…And then we're going to need…to have our speed_options.…
Along the way, series designer Kevin Skoglund introduces coding strategies, refactoring techniques, and useful skills including dynamically generating form select-option values and formatting decimal numbers and scientific notation.
- Converting length and area measurements
- Using functions to avoid repetition
- Refactoring to produce simpler code
- Converting volume and mass
- Generating form select-option values dynamically
- Formatting scientific notation
- Converting speed and temperature
Skill Level Beginner
Accessing Databases with Object-Oriented PHPwith David Powers3h 47m Intermediate
1. Length and Distance
3. Volume and Capacity
4. Mass and Weight
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.