Join Kevin Skoglund for an in-depth discussion in this video Generate sentence parts, part of Easy PHP Projects: Single-Serving Sites.
- In this movie we will build on our work from…the last movie in order to make our generated sentences…more complex and varied.…In the last movie, our sentence template was Elvis,…as a string, followed by a randomly chosen fragment.…The improvement that I want us to make here is I want…us to also be able to vary the subject,…and to be able to vary the verb, and the object separately.…In other words, break that fragment into pieces.…So, before we had "Elvis ate your sandwich."…Now, we could have something that was different like,…"Elvis needs a website."…Right? Three parts.…
Elvis, needs, a website.…So we're going to randomly pick all three of those.…You should already have the skills using array_rand…to do these for yourself.…And you can certainly try it on your own.…I'm going to walk you through it and also show you…a way that we can optimize our code at the same time.…So, in order to keep our work separate,…I'm going to take the Elvis ate your sandwich that we…worked on in the last movie and I'm going to do a…
- Finding and validating an IP address with PHP
- Parsing the HTTP request for browser details
- Comparing dates and times in PHP
- Randomizing data with PHP
- Styling page content dynamically
- Generating random sentences
Skill Level Beginner
1. What is My IP Address?
2. Browser Mirror
3. Is it New Years Yet?
4. Random Data and Styling
5. Random Phrase Generator
- 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.