I would like to know how to avoid the OUTPUT of var_dump($abc); from showing in the output screen and instead use it to feed a variable. Well, I am trying to put the output of <form><select name="study_Class"><option value="word1 (space) word2">word1 word2</option></form>
into php program as an array as shown below (as its multiple choices) and want to use the words seperated by space as in the <value> attribute. But don't want the output of var_dump($); showing in the screen. Is there a way? (Below is my code)
<form action="abc.php" method="post">
<select name="study_class[]" multiple>
<option value="Class 1">CLASS 1</option>
<option value="Class 2">CLASS 2</option>
<option value="Class 3">CLASS 1</option>
<option value="Class 4">CLASS 2</option>
</select>
</form>
abc.php
<?php
#get data
$study_class=implode(', ', $_POST['study_class']);
var_dump($study_class);
?>
<html>
.
.
<P> Study Classes Chosen are: <?php echo $study_class; ?></P>
.
</html>
So on top of the OUTPUT screen first the
string(31) Class 1, Class 2
comes.
Then my echo response comes:
Study Classes Chosen are: Class 1, Class2
HOW to avoid the string.....
Also I will be feeding the $study_class as output in mail.
Thanks.