How about this... this is how I would do it.. lol
<? print ("<input type='hidden' name='CatID' value='$result['CatID']'>"); ?>
or if that doesnt work, try splitting it onto a couple lines.. messier, but tends to work..
<?
print ("<input type='hidden' name='CatID' value='");
print ($result['CatID']);
print ("'>");
?>
The reason you got the parse error on the previous reply was the parenthesis were left off.. the format for a print is
print ("hello");
or for a variable
print ($myvariable);
Hope this helps!