$f=file('filex.txt'); $c=count($c); for($i=0;$i<$c;$i++) echo 'buy '.$f[$i].' buy '.$f[$i].' in usa';