What is the recommended approach for changing CSS styles on a webpage using PHP?

When changing CSS styles on a webpage using PHP, the recommended approach is to dynamically generate CSS code within a PHP file and link it to the HTML document. This can be done by using PHP to output CSS code based on certain conditions or variables, allowing for dynamic styling of elements on the webpage.

```php
<?php
header("Content-type: text/css");

$color = "#ff0000"; // Example variable for color

echo "
body {
    background-color: #f0f0f0;
    color: $color;
}
";
?>
```

In the above PHP code snippet, we set the content type to "text/css" using the header function, define a color variable, and then output CSS code that dynamically changes the background color and text color of the body element based on the value of the color variable. This CSS file can then be linked to an HTML document using a <link> tag.