I have following foreach loop:
$childDetails =array();
foreach( $result as $results ) {
$applicationID = $results->booking_ID;
$formType = $results->formType;
$Student_name = $results->ChilldName;
$payment = $results->Payment;
}
Now I want to get these variable values to be printed the out side of the loop
Application ID : here I have to echo $applicationID
Form type : here I have to echo $formType
Student Name : here I have to echo $Student_name
Payment : here I have to echo $payment
UPDATE:
I want to this because I have to echo the every variable and assign it to another variable.
eg : $mail_body_guest_full .= 'Form Type is' . $results->formType; how is that possible to use the above method to do this
If I echo $childDetailsoutside of the loop, it will print all of the variable values..
I want to print them one by one in different places of HTML..
how can do this?