Thank you all for your help ; I found many responses to my questions on this forum but still stuck on this one . Let me explain: I have files called “participant_pledge.php” , “parents_pledge.php” …. That contain text only. The reason for it is that this text is needed in many files within my website; so I simply use “include” wherever I need it. My problem is that I also need to include those file in the content of some “email function.” That’s where I can’t find solution to include those file since it isn’t possible to use a function within a variable. The idea would be to be able to do the following:
function update ($user_id, $update_camper_data) {
...
$message='
...
<tr>
<td>
Participant\'s Name*:
</td>
<td>
'.$update_camper_data['participant_first_name'].' '.$update_camper_data['participant_middle_initial'].' '.$update_camper_data['participant_last_name'].'
</td>
include ‘participant_pledge.php; //which does not work inside a variable
...';
mail($to, $subject, $message, $headers);
}
I have considered constant variables but could not make it work (but maybe I used it the wrong way)… Anyways, thank you in advance for your time and help on this question.
Mike.