How can i use a global variable in a .css file generated with php?

Short answer, no.

Long Answer

In your comment, you explain that you’re including wp-blog-header.php in the PHP file that generates your CSS file. This is a very bad idea.

When your page references your stylesheet, your browser sees the reference and makes a separate HTTP request to your server to pull it down. If the stylesheet is a static file, this isn’t a problem. It’s usually cached (so the browser loads it locally) or can be served from a CDN (meaning repeated requests never hit your server).

But loading it as a dynamic PHP file means it’s not cache-able. Including wp-blog-header.php also means you’re loading all of WordPress just to generate that file.

Every request to your site loads WordPress not once, but twice just to generate that one file.

What you should do instead

Extract the dynamic parts of your stylesheet. Then, in your header.php file, include an in-line <style type="text/css"> ... </style> block.

It won’t be the cleanest thing in the world, but inside header.php you can use whatever PHP variables you need to generate the CSS. And you external stylesheet stays small, static, and cache-able.