I am trying to generate HTML for something in the head section on product information pages only.

So what would be the correct way to write something like this?

PHP Code:

if ($current_page_base == 'index' and $cPath == '1' and $products_id == '123') {
  echo 
'DO STUFF';