jeudi 19 octobre 2017

Execute an echo or class x times in php

I'm having the problem that i want to echo the class $password as often, as the number of $intcount is. Can you give me any idea how I would do that? f.e. that I echo 4 random words if $intcount is 4, 5 words if its 5 etc etc.

<?php

$csv = array_map('str_getcsv', file('gen.csv'));
$count = $_GET['count'];
$intcount = (int)$count;
$min = 0;
$max = 4;
$rand = mt_rand( $min , $max );

$out = $csv[$rand][$rand];

// var_dump($count);
// var_dump($intcount);
// 
// echo $count . "\n <br>";
// echo $password * $intcount;
// 
// for ($i=0; $i < $intcount ; $i++) {
//     echo $password;
// }

?>

Thanks :)




Aucun commentaire:

Enregistrer un commentaire