You can make your code safe from overflow by using a modulus operator.
Code:
<?php
session_start();
$item = file("qoutes.txt");
$itemCount = count($item);
if ($_SESSION['sess_row'] === NULL) {
$_SESSION['sess_row'] = 0;
} else {
$_SESSION['sess_row'] = ($_SESSION['sess_row'] + 1) % $itemCount;
}
echo $item[$_SESSION['sess_row']];
?>
What this does is instead of incrementing the index of the array by one, it divides the index+1 by the total itemCount and sets the index of the array to the remainder of that division.
Or... you can just put an "if" statement in to check to see if you've gone past the end of your array.