Specific CSS for specific page

I want to have the stylesheet automatically switch when a user clicks on a specific link. My trouble is that the pages are being dynamically populated/created via CMS and so I need to do this switch with PHP under certain variables which I can’t write myself since I’m still learning. Any advice or direction of approach?