[ create a new paste ] login | about

Link: http://codepad.org/V9IKuyji    [ raw code | output | fork ]

PHP, pasted on Dec 9:
1
2
3
4
5
6
7
8
9
10
11
<?php
$str = 'Hello Friend';
 
$char_array = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY);

foreach ($char_array as $value)
{
  $number = mt_rand(1,10); 
  echo "&" . $number . $value;
}
 


Output:
1
&2H&8e&10l&4l&3o&10 &3F&5r&1i&8e&9n&10d


Create a new paste based on this one


Comments: