You can do it that way. It works very nice.
$str =array();
for($i=0;$i<10;$i++)
{
for($j=0;$j<10;$j++){
$str[]=$i;
}
$j=0;
}
echo implode($str,',');
More Related Contents:
- PHP: for-loops and if-statement
- How to limit items from for loop?
- php , I want to build array from 12 values each value has max number of 2048
- Show a number to two decimal places
- Formatting a number with leading zeros in PHP [duplicate]
- Why does PHP consider 0 to be equal to a string?
- How to mathematically evaluate a string like “2-1” to produce “1”?
- Performance of FOR vs FOREACH in PHP
- Is there an easy way to convert a number to a word in PHP?
- Why is PHP printing my number in scientific notation, when I specified it as .000021?
- Display numbers with ordinal suffix in PHP
- Test if number is odd or even
- Converting words to numbers in PHP
- Remove useless zero digits from decimals in PHP
- What is the best way to validate a credit card in PHP?
- Strange behaviour with numbers that have a leading zero [duplicate]
- PHP: Express Number in Words [duplicate]
- How can I break an outer loop with PHP?
- Round to max thousand, hundred etc in PHP
- FOR loop performance in PHP
- PHP: Create an array for a range
- PHP prepend leading zero before single digit number, on-the-fly [duplicate]
- Max file number can php upload at same time
- How can I use break or continue within for loop in Twig template?
- Multiple index variables in PHP foreach loop
- How to perform an action every 5 results?
- foreach with three variables add
- php random x digit number
- PHP remove commas from numeric strings
- Incrementing numbers starting from 0000 in php