我想从txt文件中旋转文本
这是我的下面的代码,但它不工作,我不知道我在哪里弄错了
<?php
$text= file_get_contents("text.txt");
$arr = explode("\n", $text);
$max = count($arr);
$i = 0;
while($i < 3)
{
$i++;
echo $aText[rand(0, $arr)];
?>
在我的text.txt
文件中,我有一些文字
are
can
how
now
put
see
我想逐行排除,但它无法正常工作。请帮帮我。
<?php
$arr = explode("\n", file_get_contents('text.txt'));
foreach($arr as $key =>$value)
{
echo $value;//Prints the file content
}
?>