Yes that approach is fine but you should also use htmlspecialchars. For example:
<title><?php echo htmlspecialchars($product_title); ?></title>
<meta name="description" content="<?php echo htmlspecialchars($product_desc); ?>" />
Regarding the length of the meta description. Google has the answer:
Meta descriptions can be any length, but search engines generally truncate snippets longer than 160 characters. It is best to keep meta descriptions between 150 and 160 characters.
So, if you would like to do the work for the search engines you can truncate the meta description by using substr.
<?php
echo '<title>'.htmlspecialchars($product_title).'</title>'.
'<meta name="description" content="'.htmlspecialchars(substr($product_desc,0,160)).'" />';
?>