I'm trying to use arrays to return a specific CSS code, but I haven't found an automatic way to make the value of the array change according to the array. Here's what i'm trying to do:
$css = array(
"bgcolor" => array(
"wh" => array(* => "background-color:rgba(255,255,255,*);"),
"bk" => array(* => "background-color:rgba(0,0,0,*);")
),
"textcolor" => array(
"wh" => "color: #FFFFFF;",
"bk" => "color: #000000;"
),
"fade" => array(
"wh" => array(* => "box-shadow:#FFF 0px 0px *px;"),
"bk" => array(* => "box-shadow:#000 0px 0px *px;")
)
);
I'm using the * just to illustrate what i'm trying to achieve. This is what the code is supposed to return:
$css["bgcolor"]["wh"][0.5]; // print background-color:rgba(255,255,255,0.5);
$css["textcolor"]["wh"]; // print color: #FFFFFF;
$css["fade"]["wh"][100]; // print box-shadow:#FFF 0px 0px 100px;
I don't know if what I want is possible, but I think it is, I just dont know how. :D