How to rewrite head to inject JS and or Css - Php

Hi there,
I would like to know if there is a way to dynamically rewrite part of the document eg. HEAD in order to inject my js and or css please.

Thanks for any help,

Regards,

Jerome