将DB中的值放入数组中

I want to put my DB values into array

 $lic=array();
if ($lic[0] == 1)
{
    echo "Pirma lic ir";
}
elseif ($lic[0] == 0)
{
    echo "Pirma lic nav";
}
else
{

}


if ($lic[1] == 1)
{
    echo "Otra lic ir";
}
elseif ($lic[1] == 0)
{
    echo "Otra lic nav";
}
else
{

}

$lic I get from my DB

$lic = mysql_real_escape_string($row['lic']); // licences

So from

echo " ".$lic." "; <<<<<----- from this 

From this I get 1,1,1,1,1 - all of them can be 0 or 1.

I want to put them into array so I can define what's first,second,third I want them to be in array() <- Inside this How do I get it there?

ok so u mean you want to split the string from "1, 1, 1, 0 ,1" to array??

so to split you can use ..

// if you $lic is like below 
$lic  = "1, 1, 0, 1, 0, 1, 0, 0";

$arr = explode(", ", $lic);

echo $arr[0]; // 1
echo $arr[1]; // 1
echo $arr[2]; // 0