mercredi 22 avril 2020

How replace number with "-" randomly from a range of number using php

This is my sample data. i want to replace 2 number from this range randomly.

1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,

i trying this code.

    <?php
    for ($i=1; $i <= $noof_q; $i++){
    for ($j=0; $j < $max_range; $j+=$increment){
    echo $min_range+$j.", ";
    }
    if ($j==$max_range) {
    echo "<br>";
    }
    }
   ?>



Aucun commentaire:

Enregistrer un commentaire