$num=35;
for($i=1;$i<$num;$i=$i+10)
{
$j=$i+9;
if($j>$num)
$j=$num;
echo $i.' to '. $j;
}
More Related Contents:
- Getting all possible combination of an array
- Undefined index $_POST
- How do I explode() these variables?
- Reference — frequently asked questions about PDO
- Warning: A non-numeric value encountered
- Getting raw SQL query string from PDO prepared statements
- PHP Sort a multidimensional array by element containing Y-m-d H:i:s date
- “Invalid parameter number: parameter was not defined” Inserting data
- Does PHP allow named parameters so that optional arguments can be omitted from function calls?
- Curl error 60, SSL certificate issue: self signed certificate in certificate chain
- Is there any particular difference between intval and casting to int – `(int) X`?
- Group array data on one column and sum data from another column
- Parse a CSS file with PHP
- Dynamic table in HTML using MySQL and php
- PHP Warning: move_uploaded_file() unable to move
- Is mysql_real_escape_string() necessary when using prepared statements?
- How to use PHP to connect to sql server
- Order By before Group By using Eloquent (Laravel)
- PDO: Invalid parameter number: mixed named and positional parameters
- Object of class mysqli_result could not be converted to string
- PHP 5.4 vs 5.3 app errors
- Ideal PHP Session Size?
- PHP dynamic name for object property
- How to setup a cron job in Magento module?
- converting SOAP XML response to a PHP object or array
- What does a leading zero do for a php int?
- Insert value list does not match column list: 1136 Column count doesn’t match value count
- Get number of weekdays in a given month
- PHP mail() works from command line but not apache
- How can I create custom SEO-friendly URLs in OpenCart?