0

Hey guys.. I have a foreach loop (with multiple variables inside of it) and I need to collect the variables, as well as other content, and store it into a single string so I can output it into an email. Has anyone done something similar to this before?

Here's some sudo code for what I'm trying to accomplish.. or something similar anyway.. ideas?

$body = "

echo $_POST['email']."<br />";
echo $_POST['percent']."%<br />";
$answers = $_POST['answers'];
$userans = $_POST['userans'];
$results = $_POST['results'];

foreach($_POST['questions'] as $i => $questions){
	echo $questions."<br />";
	echo $answers[$i];
	echo $results[$i];
}

";
1
Contributor
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Encrypted
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.