HTML Academy
  • HTML Academy
  • Courses
  • Courses
  • For schools
  • Advanced Courses
    • Regular expressions
    • Template Engine
    • Design systems
    • CSS-animation
    • Algorithms and Data Structures
    • TypeScript, part 1. Type theory
  • Sign up
  • Log in
  • Home
  • Interactive courses
  • PHP basics
  1. Conditions in PHP0/14
  2. Arrays and loops in PHP0/15
  3. Arrays and functions in PHP0/16
  4. Numbers and strings in PHP0/14

Chapter 4: Numbers and strings in PHP

14 tasks and 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.

Get access
Creating pagination in the catalog Task
Calculating the offset Task
The intval function Task
The shorthand ternary operator ?: Task
The for loop Task
Embedding the for loop in the template Task
Adding an address to the href attribute Task
Counting the number of catalog pages Task
The ceil function Task
The ternary operator ?: Task
Highlighting the link to the current page Task
The date function Task
Changing the date format Task
Using double quotes Task
Summary of “Numbers and Strings in PHP” Summary

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

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.