Question: I have a problem where I am trying to output a checkbox on an html page the only problem is I want to use a variable that is in $row['STUDENT\_ID'] but the checkbox also has double quotes, which is what I am using for echo. The double and single quotes are confusing me and I can't get it to work quite right.

```
     echo "
  <tr>
  <td><input type="checkbox" name="name" value=". $row['STUDENT_ID'] . " />
  <td>" . $row['STUDENT_ID'] . "</td>
  <td>" . $row['FName'] . "</td>
  <td>" . $row['LName'] . " </td>
  </tr>
  ";

```

Answer: 
In such cases use a [HEREDOC](http://php.net/heredoc) string instead:

```
echo <<<HTML
  <tr>
    <td><input type="checkbox" name="name" value="{$row['STUDENT_ID']}" />
    <td>{$row['STUDENT_ID']}</td>
    <td>{$row['FName']}</td>
    <td>{$row['LName']}</td>
  </tr>
HTML;

```

Also notice the `{$..}` curly string syntax for embedding the `$row[]` values.
Read in to [PHP Strings](http://php.net/manual/en/language.types.string.php) and check out he examples on how to place double quotes within a set of double quotes (or singles within a set of singles).

```
echo "This is an \"Escaped\" set of quotes";
echo 'Likewise, but \'single\' quote style';

```