Another small thing you could do (while everyone's ripping your code apart) is not put a function here:
for($i=0; $i<sizeof($sourcenews); $i++){
instead, do something like this - because it does make a performance difference
$sizeofsourcenews = sizeof($sourcenews);
for($i=0; $i<$sizeofsourcenews; $i++){
A lot of people never think about it, but that function is called on every loop to make sure i < that size... in a big situation, it would make a big difference.