Echo out the PHP Function Or Return?
I am not good with functions and classes in PHP. I am echoing a function
instead of return because it gives me desired results. But it also echo
out the result value to my desired page. This function is in class. Just
see this screenshot and you will understand what i want.
Echo out the total numbers:
<?php
echo $results->get_total_marks_subjects($subject_detail['subject_id']);
?>
Here is function code in class:
while($rec = mysql_fetch_array($link)) {
//i think the code below echoes out that message.
echo $rec['total_marks']." | ";
//return $rec['total_marks'];
}
}
No comments:
Post a Comment