Flash has a loadvariables function:
loadVariables ("file.php", this);
this will execute the php file "file.php" now what you need to do is print the php output that you want to use in flash like this:
echo "var1=value1&var2=value2&var3=value3&etc...";
this will load the variables var1, var2 and var3 in the Flash mc (movieclip) where the piece of code is nested (this).
Now u can use the variables in the flash movie.
Raoul