HTML Academy
  • HTML Academy
  • Courses
  • Tutorials
  • Courses
  • Tutorials
  • Sign up
  • Log in
  • Home
  • Interactive courses
  • PHP basics
  1. Conditions in PHP 0/14
  2. Arrays and loops in PHP 0/15
  3. Arrays and functions in PHP 0/16
  4. Numbers and strings in PHP 0/14

Chapter 4: Numbers and strings in PHP

14 tasks, 1 summary

Let's learn how to work with numbers and strings in PHP, and we will introduce you to the for loop and the ternary operator. We will figure out how to create pagination and display the date on the page in a complex format.

Start
1. Creating pagination in the catalog Task
2. Calculating the offset Task
3. The intval function Task
4. The shorthand ternary operator ?: Task
5. The for loop Task
6. Embedding the for loop in the template Task
7. Adding an address to the href attribute Task
8. Counting the number of catalog pages Task
9. The ceil function Task
10. The ternary operator ?: Task
11. Highlighting the link to the current page Task
12. The date function Task
13. Changing the date format Task
14. Using double quotes Task
15. Summary of “Numbers and Strings in PHP” Summary

Cookies ∙ Privacy ∙ License Agreement ∙ About ∙ Contacts ∙ © HTML Academy OÜ, 2019−2025

VISAMastercard

Log in

or

Forgot your password?

Sign up

Sign up

or
Log in

Restore access

Have you forgotten your password or lost access to your profile? Enter your email connected to your profile and we will send you a link to restore access.

Forgot to connect your email to the profile? Email us and we’ll help.

We are using cookies to gather information which will help you use our website most effectively. You can read about this here or disable this feature if you want. By continuing to browse the site, you agree to our use of cookies.