newbie question on escaping strings



I know this isn't a hard one, but it's making me slightly crazy. :-) I
have the following code that works just fine:

while( $row = mysql_fetch_array( $result ) ){
$id = $row['practcatid'];
$name = $row['practcatname'];
print "<option value='$id'> $name </option>\n";
}

What I'd like to be able to do however is use the two array
components, $row['practcatid'] and $row['practcatname'], in the final
print statement directly rather than dereferencing them to $row and
$name first. However, the string escaping is screwing me up. I need:

1 - a single or double quote to demarcate the entire string
2 - a single or double quote, escaped or otherwise, to demarcate the
ends of the attribute value, and
3 - a single quote (I think!), escaped or otherwise, to name the $row
array components.

Whatever it takes, I can't get it to work. Help!

TIA,
Howard
.