How to remove duplicate mobile numbers from input text box1 and print the result into text box2.
Example mobile nos:
7795012345
7795012345
7795012345
7411312354
7411312354
9900454321
9900454321
9632554123
9632554123
output should be:
7795012345
7411312354
9900454321
9632554123
<?php
$myarray = array();
$myarray['numbers']=$_POST['numbers'];
foreach($myarray as $num){
$numbers=$num;
}
$unique = array_unique($numbers);
$output=implode("<br />",$unique);
?>
<form method="post">
Result <textarea rows="5" cols="30"><?php echo $output;?></textarea><hr/>
<textarea name="numbers" class="span8 note" id="numbers" rows="5" cols="30"></textarea><hr/>
<input type="submit" value="ADD"/>
</form>