Thanks for the reply Sxooter, but I can't seem to get it right.
I am using the code below:
passthru("yum check-update",$var);
echo $var;
ob_implicit_flush(1);
but the result is outputed after the command ends. I am not sure if I am using the implicit_flush. I have never used it before.
I have also tried with exec() and putting the result into an array, which I loop, but still the same results.