Code:
<?php
$file = implode('', file('mylist.txt'));
for($i = 0; $i < strlen($file); $i++) {
if($file[$i] == "b"){
die("for good.");
}
}
?>
That does what you are asking, but what are you trying to accomplish, just wondering ?
http://www.php.net/file
http://www.php.net/strlen
http://www.php.net/implode
Good luck,
- Stewart
link removed