How should I write the following code correctly?

Source: Internet
Author: User
How to write the following code correctly? $ a & nbsp ;=& nbsp; "'000000', '000000', '000000', '000000', '000000 ', '000000', '000000', '000000', '000000', '000000', '000000' "; echo & nbsp; $; srand (float) & nbsp; how should I write the following code correctly?
$a = "'111','222','333','1111','2222','3333','1112','2221','33313','1114','2225','3336'";

echo $a;
srand((float) microtime() * 10000000);
$input = array($a);
$rand_keys = array_rand($input, 10);
echo $input[$rand_keys[0]].','.$input[$rand_keys[1]].','.$input[$rand_keys[2]].','.$input[$rand_keys[2]].','.$input[$rand_keys[4]].','.$input[$rand_keys[5]].','.$input[$rand_keys[6]].','.$input[$rand_keys[7]].','.$input[$rand_keys[8]].','.$input[$rand_keys[9]];



srand((float) microtime() * 10000000);
$input = array('111','222','333','1111','2222','3333','1112','2221','33313','1114','2225','3336');
$rand_keys = array_rand($input, 10);
echo $input[$rand_keys[0]].','.$input[$rand_keys[1]].','.$input[$rand_keys[2]].','.$input[$rand_keys[2]].','.$input[$rand_keys[4]].','.$input[$rand_keys[5]].','.$input[$rand_keys[6]].','.$input[$rand_keys[7]].','.$input[$rand_keys[8]].','.$input[$rand_keys[9]];



Why is the above code incorrect? is the following code correct?

What should I do if the above section is correct?

If you know the experts, please give them the code directly. thank you for sharing it with us: More

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.