for ($i=0 ; $i<=$variablealeatoria ; $i++){ $texto[$i]=$textoGenerado; }
for ($i=variablealeatoria ; $i>0 ; $i--){ echo $texto[$i]; }