php.org PHP Logo
Beginner Intermediate Advanced

Search results for: "digits"

Why are the XXX_time values in the database set as int(11) if int can only hold up to 10 digits?

The XXX_time values in the database are set as int(11) because the int data type in MySQL can hold up to 11 digits, not just 10. The number in parenth...

What is the best way to split a number into individual digits and assign each digit to a separate variable in PHP?

To split a number into individual digits and assign each digit to a separate variable in PHP, you can convert the number to a string and then use str_...

How can PHP be used to automatically format numbers to be three digits long before storing them in a database?

To automatically format numbers to be three digits long before storing them in a database, you can use PHP's str_pad() function to add leading zeros t...

How can regular expressions be used to ensure that a number in PHP has a specific format, such as being 4 digits long?

Regular expressions can be used in PHP to ensure that a number has a specific format by defining a pattern that the number must match. To ensure that...

How can one efficiently calculate the sum of digits in a given number using PHP?

To efficiently calculate the sum of digits in a given number using PHP, you can convert the number to a string and then iterate through each digit, co...

Showing 26 to 30 of 202 results

‹ 1 2 3 4 5 6 7 8 9 10 ... 40 41 ›
PHP.ORG

A free knowledge base for PHP developers. Open to all.

Legal

  • About
  • Contact / Imprint
  • Terms
  • FAQ

© 2025 php.org. All rights reserved.