Following will do the trick.
for($i=0;$i<10000;$i++)
echo "text".str_pad ($i,4,'0', STR_PAD_LEFT)."<br />";
More Related Contents:
- PHP PDO and Mysql [closed]
- PHP – File to Associative Array with 1 key and two values attached
- Notice: undifined index, but why?
- In PHP What would be the output of print 4
- Php preg_match_all, wordpress function [closed]
- How to enable PHP short tags?
- Compare floats in php
- How to explain Composer’s error log?
- How to flush output after each `echo` call?
- Access PHP variable in JavaScript [duplicate]
- PHP Session timeout
- index.php not loading by default
- How can I use mysqli_fetch_array() twice?
- Unable to retrieve UTF-8 accented characters from Access via PDO_ODBC
- PHP foreach with Nested Array?
- PHP – Indirect modification of overloaded property
- Installing PHP Zip Extension
- SSL error SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
- Executing a PHP script with a CRON Job [closed]
- How to handle multiple file upload using PHP
- How to run the PHP script at scheduled time
- Checking if mysqli_query returned any values?
- laravel 5.4 upload image
- Notice: Undefined index: HTTP_REFERER
- Call to undefined method mysqli_result::fetch()
- How do I install GD on my windows server version of PHP
- escaping column name with PDO
- Getting basic information from Instagram using PHP
- How to remove extension from file name (only real extension!) [duplicate]
- WooCommerce – send custom email on custom order status change