<?php
$fruits
=
array
(
"apple"
,
"banana"
"orange"
"grape"
"kiwi"
);
$randomKeys
array_rand
, 2);
$randomFruits
();
foreach
as
$key
) {
[] =
[
];
}
print_r(
?>
$animals
"dog"
"cat"
"rabbit"
"turtle"
"hamster"
shuffle(
$randomAnimals
array_slice
, 0, 3);
function
getRandomArrayElements(
$arr
$num
$count
count
if
>=
return
;
$keys
$randomArr
$colors
"red"
"blue"
"yellow"
"green"
"purple"
$randomColors
= getRandomArrayElements(
, 4);
举报
本版积分规则 发表回复 回帖后跳转到最后一页
提供设计文章,教程和分享聚合信息与导航工具,最新音乐,动漫,游戏资讯的网站。
Archiver|小黑屋|SiteMap|艾Q网 |网站地图
Powered by Discuz! X3.4 © 2001-2019 艾Q网科技