PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php // Set a default value for testing $m = 5; $res = []; $currentRow = 1; for ($i = 1; $i <= $m; $i++) { $res[] = $currentRow; $currentRow = $currentRow * 10 + $i; } if (empty($res)) { echo '[]'; } else { echo '[' . implode(',', $res) . ']' . PHP_EOL; } ?>
Show:  
Copy Clear