If I have these defined named constants in an include file:
define('FORM_FIELD_QUESTION_1', 'Question1?');
define('FORM_FIELD_QUESTION_2', 'Question2?');
define('FORM_FIELD_QUESTION_3', 'Question3?');
define('FORM_FIELD_QUESTION_4', 'Question4?');
define('FORM_FIELD_QUESTION_5', 'Question5?');
define('FORM_FIELD_QUESTION_6', 'Question6?');
define('FORM_FIELD_QUESTION_7', 'Question7?');
define('FORM_FIELD_QUESTION_8', 'Question8?');
define('FORM_FIELD_QUESTION_9', 'Question9?');
define('FORM_FIELD_QUESTION_10', 'Question10?');
Then, I'm trying to loop through them and create a result in which I wanted use such as:
for ($i = 1; $i <= 10; $i++) {
$email_body .= '<span>'.FORM_FIELD_QUESTION_.$i.'</span><br>';
}
echo $email_body;
But instead of the constant values, all I get is the name of the constant. How do I simply achieve this?