I need to generate something like this using PHP:
******
*********
****
***********
******
********
*******
*********
*******
**********
********
******
********
using PHP.
So, if i.e. I have this code so far:
<?php
$character = "*"; //character that will be used in generated strings
$min = "4"; //minimum characters for a generated string
$max = "12"; //maximum characters for a generated string
?>
What is the efficient way to write the next part of the code for rand() and echo of the string?
You could use
str_repeat()in conjunction withmt_rand()(or plain oldrand()) using those variables.