I'd basically have to concur with Pig; PHP is only going to spew out whatever the programmer has told it to, and if he messed up the CSS, it's not PHP's fault. But, as Pig also mentioned, it's not entirely clear from your post exactly what is the problem.
For example, I have PHP identify a user-agent (browser) and expel the CSS instruction based on what browser is viewing the site.
// first, some browser detection <skipped!>
// then, switch the browser and assign the value
switch ($browser) {
case "Mozilla":
$sheet="mozilla.css";
case "Opera":
$sheet="opera.css";
case "MSIE":
$sheet="msie.css";
}
// Then, echo the HTML/CSS statement
echo "@include \"$sheet\";";
So, you can kind of see at least one thing that PHP is generally used for. It makes decisions about what kind of content is to be sent to the browser based on input from the browser, or other information the programmer has designed into the system.
Please do as Pig suggested and examine your HTML source carefully. If you're reading CSS tags from a database via PHP, I guess it's possible that magic quotes (or slashes) or something is interfering with certain tags, and this might account for what you're seeing.