Yngvarr

Generation

generate functionMon, 17 Apr 2023

после каждой цифры вставить случайную букву

print_r(str_split('123456789')); function randLetter(){ $str = 'qwertyuiopasdfghjklzxcvbnm'; $len = strlen($str); return $str[rand(0, $len-1)]; } function addLetter(array &$arr){ foreach ($arr as $key => $val) { $arr[$key] = $val . randLetter(); } } $arr = str_split('123456789'); addLetter($arr);

Want to kickstart your project?Use the new AI Studio to create your code