Integers are whole numbers such as 1 and 2. This also includes negative whole numbers such as -3 and -4. PHP uses integers for a variety of applications, such as mathematical calculations like multiplication and addition. Integers can also be used to set the range of how certain functions work in addition to increasing or decreasing another integer. "Numbers part one: Integers" introduces elementary working knowledge of how integers work in PHP and MySQL.
Over the course of the next two movies, we're going to be talking about numbers. …And we're going to start out by first talking about Integers. …Integers are whole numbers, so that's numbers like 1, 2, 3, 4, 5, as well as …negative 1, negative 2, negative 3, and so on. …I think what a number is, is pretty intuitive. …We all kind of have an idea of that by now. …But we do still need to see how we work with them in PHP. …Let's create a new document we can work with. …I'm going to open up basic.HTML and I'm going to do just Save As. …I'm going to change this one to be integers.PHP. …Make sure you've got PHP at the end. Integers.…
Now, we've seen how we could just have our basic PHP tags and assign a variable. …var1 equals 3, and var2 equals 4. And we saw how we can add those together …and we can echo back the result. Let me go ahead and just show you a bit …more math. We're going to be echoing the result back …from adding 1 plus 2 plus the value of var1. …That's 3, and then multiplying that by var2. …
Author
Updated
5/20/2015Released
6/4/2013- What is PHP?
- Installing and configuring PHP and MySQL
- Exploring data types
- Controlling code with logical expressions and loops
- Using PHP's built-in functions
- Writing custom functions
- Building dynamic webpages
- Working with forms and form data
- Using cookies and sessions to store data
- Connecting to MySQL with PHP
- Creating and editing database records
- Building a content management system
- Adding user authentication
Skill Level Beginner
Duration
Views
Q: This course was revised on 6/4/2013. What changed?
A: The old version of this course was 6 years old and it was time for a complete revision, using PHP 5.4. (The tutorials will work with any version of PHP and covers any differences you might encounter). The author has also added updated installation instructions for Mac OS X Mountain Lion and Windows 8. The topics and end project are the same, but the code is slightly different. It also addresses frequently asked questions from the previous version.
Q: This course was updated on 5/20/2015. What changed?
A: We added one movie called "Changing the document root in Yosemite," which helps the Mac installation run more smoothly.
Related Courses
-
PHP with MySQL Beyond the Basics (2009)
with Kevin Skoglund10h 26m Intermediate -
Ajax with PHP: Add Dynamic Content to Websites
with Kevin Skoglund3h 37m Intermediate
-
Introduction
-
Welcome56s
-
Using the exercise files3m 8s
-
-
1. PHP Overview
-
What is PHP?3m 52s
-
The history of PHP2m 51s
-
Why choose PHP?4m 10s
-
Installation overview4m 13s
-
-
2. Mac Installation
-
Overview2m 33s
-
Changing the document root7m 24s
-
Installing to Yosemite8m 13s
-
Enabling PHP6m 16s
-
Upgrading PHP3m 30s
-
Configuring PHP10m 3s
-
Installing MySQL5m 46s
-
Configuring MySQL7m 24s
-
Text editor5m 1s
-
-
3. Windows Installation
-
Overview3m 27s
-
Installing WampServer5m 46s
-
Finding the document root2m 24s
-
Configuring PHP8m 12s
-
Configuring MySQL5m 45s
-
Text editor5m 51s
-
-
4. First Steps
-
Embedding PHP code on a page6m 43s
-
Outputting dynamic text5m 55s
-
The operational trail2m 27s
-
Inserting code comments4m 7s
-
-
5. Exploring Data Types
-
Variables7m 50s
-
Strings4m 38s
-
String functions8m 54s
-
Numbers part one: Integers6m 27s
-
Arrays10m
-
Associative arrays6m 37s
-
Array functions6m 33s
-
Booleans3m 50s
-
NULL and empty5m 15s
-
Type juggling and casting8m 27s
-
Constants4m 43s
-
-
6. Control Structures: Logical Expressions
-
Else and elseif statements4m 16s
-
Logical operators7m 30s
-
Switch statements9m 51s
-
7. Control Structures: Loops
-
While loops8m 41s
-
For loops5m 59s
-
Foreach loops8m 16s
-
Continue8m 28s
-
Break4m 8s
-
Understanding array pointers6m 43s
-
-
8. User-Defined Functions
-
Defining functions8m 25s
-
Function arguments5m 32s
-
Multiple return values4m 53s
-
-
9. Debugging
-
Common problems3m 47s
-
Warnings and errors8m 36s
-
-
10. Building Web Pages with PHP
-
Links and URLs5m 33s
-
Using GET values5m 35s
-
Encoding GET values8m 41s
-
Encoding for HTML9m 26s
-
Modifying headers6m 45s
-
Page redirection6m 43s
-
Output buffering7m 34s
-
-
11. Working with Forms and Form Data
-
Building forms7m 28s
-
Detecting form submissions5m 59s
-
Single-page form processing7m 57s
-
Validating form values10m 40s
-
Displaying validation errors7m 23s
-
Custom validation functions6m 28s
-
-
12. Working with Cookies and Sessions
-
Working with cookies2m 49s
-
Setting cookie values5m 55s
-
Reading cookie values6m 1s
-
Unsetting cookie values4m 51s
-
Working with sessions8m 29s
-
-
13. MySQL Basics
-
MySQL introduction6m 43s
-
Creating a database7m 41s
-
Creating a database table7m 42s
-
CRUD in MySQL5m 48s
-
Populating a MySQL database7m 32s
-
Relational database tables6m 40s
-
-
14. Using PHP to Access MySQL
-
Database APIs in PHP4m 51s
-
Connecting to MySQL with PHP7m 45s
-
Retrieving data from MySQL8m 47s
-
Working with retrieved data6m 12s
-
Creating records with PHP6m 58s
-
SQL injection3m 5s
-
Escaping strings for MySQL6m 45s
-
-
15. Building a Content Management System (CMS)
-
Blueprinting the application7m 19s
-
Building the CMS database5m 14s
-
Establishing your work area4m 38s
-
Making page assets reusable6m 36s
-
-
16. Using Site Navigation to Choose Content
-
17. Application CRUD
-
Refactoring the page selection10m 52s
-
Creating a new subject form6m 55s
-
Passing data in the session9m 16s
-
Validating form values9m 40s
-
Using single-page submission7m 44s
-
Deleting a subject9m 44s
-
Cleaning up10m 37s
-
Assignment: Pages CRUD4m 30s
-
18. Building the Public Area
-
The public appearance8m 52s
-
The public content area5m 51s
-
Protecting page visibility6m 57s
-
-
19. Regulating Page Access
-
Admin CRUD8m 41s
-
Encrypting passwords7m 26s
-
Salting passwords5m 42s
-
New PHP password functions3m 13s
-
Creating a login system11m 28s
-
Checking for authorization5m 48s
-
Creating a logout page5m 40s
-
Conclusion
-
Next steps2m 4s
-
- 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.
CancelTake 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.
Share this video
Embed this video
Video: Numbers part one: Integers