# Echoing variable data

**URL:** <https://forum.kirupa.com/t/echoing-variable-data/268881>\
**Category:** programming\
**Created:** [August 20, 2008, 12:26am UTC](https://forum.kirupa.com/t/echoing-variable-data/268881 "2008-08-20T00:26:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pherank](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@Pherank](https://forum.kirupa.com/u/Pherank)\
**Post date:** [August 20, 2008, 12:26am UTC](https://forum.kirupa.com/t/echoing-variable-data/268881/1 "2008-08-20T00:26:48Z")

</div>

In an email form, I have a portion of PHP script that looks like this:

```auto

$type = (!empty($_REQUEST["type"]))?$_REQUEST["type"]:"";
switch($type) {
    case "proreq": $mail_subject = "Requirement for Radioisotope"; break; $send_to = ""; break; $special = "Please provide a brief explanation regarding your radioisotope requirements, and FULL contact information. We will contact you directly. Thank you!<br>"; break;
    case "o18": $mail_subject = "Requirement for Oxygen-18"; break; $send_to = ""; break; $special = "Please provide a brief explanation regarding your O-18 requirements, and FULL contact information. We will contact you directly. Thank you!<br>"; break;
    default: $mail_subject = $type; $send_to = ""; break;
}

```

There’s no trouble with passing the variables $mail\_subject and $send\_to, but $special never gets passed to the HTML tag below:

```auto
<tr><td colspan="2"><p><font color="#626867"><?php echo $special;?></font></p></td></tr>

```

If I place $special outside of the function with the switch statement and hard code the data it works on its own (below). But it’s important that I be able to use the switch statement.

```auto
$special = "Please provide a brief explanation regarding your radioisotope requirements, and FULL contact information. We will contact you directly. Thank you!<br>"; break;

```

Any ideas what I’m missing here?
