Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ## GNU Public Licence. Created by Børge Wennberg 2011
- ## I know this is a hard way of doing it, but I wanted to check the string line before stripping the numbers.
- $rawline = mt_rand(10000,100000) * mt_rand(1000,1000000);
- $rawlenght = strlen($rawline);
- if($rawlenght > 9) {
- echo '<br>';
- $search = array('2', '3', '4', '5', '6', '7', '8', '9');
- $replace = array('0', '1', '1', '0', '0', '1', '0', '0', '1');
- $newline = str_replace($search, $replace, $rawline);
- echo $newline;
- $newlineLen = strlen($newline);
- }
- else {
- echo '<br>String not generated.';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement