html - Unorder print out of echo in php -
i don't why happen? in php code i'm trying echo job status retrieve database mysql function newjob. prints old*job status: instead of job status: old. client side , server side programming run @ same time or have order compile?
echo '<b>'.'job status: '.'</b>' .newjob($row['new_job'])."<br />"; function newjob($num) { if($num == 1) { echo "new"; }else{ echo "old"; } }
never make function output value.
but return it.
echo '<b>'.'job status: '.'</b>' .newjob($row['new_job'])."<br />"; function newjob($num) { if($num == 1) { return "new"; }else{ return "old"; } }
Comments
Post a Comment