Oh wait... you actually want it to print in the order given by the file? If that is the case, then you need to store state, possibly by using another file to record the current line index. For example:
$s_con = array_filter(file('text_ads.txt'),
create_function('$a', 'return rtrim($a) != "~";'));
$index = file_get_contents('text_ads_index.txt');
file_put_contents('text_ads_index.txt', ($index + 1) % count($s_con)); // PHP5
echo $s_con[$index];