just try this
<?php
$contents = file("combo.txt");
foreach($contents as $line) {
$line = str_replace("
", "", $line);;
if ($line != "end") {
echo $line;
break;
}
}
?>
output
1
I change the place of the echo
with break
You should first echo
what you want and then break
it
And if you look at the $line
there is one
so I remove it and it work now
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…