+ 1
I need to create one so that the variable $ name to get the name of the syllables of which is in the variable $ name1 help me.
<?php error_reporting(-1); $name = ''; for($x = 1;$x <= 4;$x++){ $name1 =array( 'пи', 'зде', 'ло', 'ке', 'про', 'ня'); $rand = array_rand($name1); $randText = $name1[$rand]; echo "выпало число $rand, а слог $randText.\n"; } $name = $randText.$randText.$randText.$randText; echo "-----------\n"; echo "имя $name, не прогадаешь!!!\n"; ?>
1 ответ
0
$name1. where the value of $name1 would be the new variable.
$name1 ="new_var";
$name1 = 0;
echo $new_var;
output: 0