jeudi 16 juillet 2015

how can i pick out odd numbers from a series of numbers

<?php
$i=1;
while($i<=13)
{
$rev=rand(0,9);
$Rev=strrev($rev);
echo $Rev;
$i++;
}
?>

the above code generates a series of numbers which are reversed ...the idea is to calculate the luhn digit which requires that you pick out odd numbers ...please how can I achieve this ??




Aucun commentaire:

Enregistrer un commentaire