Php+ajax randomly generates problems. $username=$number executes errors like this

the following is the back-end code
I think $username= is a randomly generated string in the output, so write $username=$number; like this, but this is an execution error, how to do it? For advice, thank you

<?php
$username=$_POST["username"];
$numbers = range (1,20); 
//
srand ((float)microtime()*1000000); 
shuffle ($numbers); 
//list
while (list(, $number) = each ($numbers)) { 
//echo "$number "; 
 $username=$number;
 $data="{username:"" . $username . ""}";//json
 echo json_encode($data);//json
?>
Feb.26,2021

try, except for the lack of a'}'in the end, there is nothing wrong with it, or you don't have a post 'username' to the backend that leads to Undefined index?.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e82ce3-c04.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e82ce3-c04.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?