Ok,
hats doch schon mal gegeben, hier nochmal der Code:
$k = 1;
$Features = $row['verkehrallg'];
for ($m=0; $m<5; $m++)
{
if ($Features & $k)
{
$Featureset[$m]=1;
}
else
{
$Featureset[$m]=0;
}
$k *= 2;
}
print_r($Featureset);
Georg