foreach($students as $k => $v){
echo $k."--".$v;//输出(打印)姓名
echo "<br />";
}
echo $k."--".$v;//输出(打印)姓名
echo "<br />";
}
2018-03-08
<?php
$love = "I love you!";
$string1 = "刘和娟,$love";
$string2 = '刘和娟,$love';
echo $string1;
echo "<br />";
echo $string2;
?>
$love = "I love you!";
$string1 = "刘和娟,$love";
$string2 = '刘和娟,$love';
echo $string1;
echo "<br />";
echo $string2;
?>
2018-03-08
<?php
$str_string1 = '刘和娟是我梦中女孩';
$str_string2 = "我还是忘不了她";
echo $str_string1;
echo "<br />";
echo $str_string2;
?>
$str_string1 = '刘和娟是我梦中女孩';
$str_string2 = "我还是忘不了她";
echo $str_string1;
echo "<br />";
echo $str_string2;
?>
2018-03-08
<?php
$sum = 10;
echo "宝宝好饿!";
while($sum<100){
$num = rand(1,20);
$sum += $num;
echo "好饿!我还要吃!";
}
echo "宝宝吃饱了,好知足!";
?>
$sum = 10;
echo "宝宝好饿!";
while($sum<100){
$num = rand(1,20);
$sum += $num;
echo "好饿!我还要吃!";
}
echo "宝宝吃饱了,好知足!";
?>
2018-03-08
<?php
$data_int1=123;//十进制数
echo $data_int1;
echo "<br />";
$data_int2=-123;//一个负数
echo $data_int2;
echo "<br />";
$data_int3=0123;//八进制数
echo $data_int3;
echo "<br />";
$data_int4=0x123;//十六进制数
echo $data_int4;
echo "<br />";
$data_int5=0x1234;
echo $data_int5;
echo "<br />";
?>
$data_int1=123;//十进制数
echo $data_int1;
echo "<br />";
$data_int2=-123;//一个负数
echo $data_int2;
echo "<br />";
$data_int3=0123;//八进制数
echo $data_int3;
echo "<br />";
$data_int4=0x123;//十六进制数
echo $data_int4;
echo "<br />";
$data_int5=0x1234;
echo $data_int5;
echo "<br />";
?>
2018-03-08
<?php
$sum = 0;
echo "本大王好饿,铲屎官速来!";
echo "<br />";
while($sum<100){
$num = rand(1,20);
echo "本大王这次要一口吃".$num."粒猫粮,emmm...好吃好吃!";
echo "<br />";
$sum = $sum + $num;
echo "emmm...本大王吃了".$sum."粒了,不够,还要吃~~~";
echo "<br />";
}
echo "嗝~~~还是不吃了吧,终于吃饱了,退下吧!"
?>
$sum = 0;
echo "本大王好饿,铲屎官速来!";
echo "<br />";
while($sum<100){
$num = rand(1,20);
echo "本大王这次要一口吃".$num."粒猫粮,emmm...好吃好吃!";
echo "<br />";
$sum = $sum + $num;
echo "emmm...本大王吃了".$sum."粒了,不够,还要吃~~~";
echo "<br />";
}
echo "嗝~~~还是不吃了吧,终于吃饱了,退下吧!"
?>
2018-03-07
<?php
$my_book = "我的小写的book";
$my_BOOK = "我的大写的BOOK";
echo $my_book;
echo "<br />";
echo $my_BOOK;
echo "<br />";
$my_book = "这次奇迹要发生啦";
echo $my_book;
echo "<br />";
$she_face = "我的梦中女孩:刘和娟";
echo $she_face;
?>
$my_book = "我的小写的book";
$my_BOOK = "我的大写的BOOK";
echo $my_book;
echo "<br />";
echo $my_BOOK;
echo "<br />";
$my_book = "这次奇迹要发生啦";
echo $my_book;
echo "<br />";
$she_face = "我的梦中女孩:刘和娟";
echo $she_face;
?>
2018-03-07