PHP Variables & Arrays
PHP Variables & Arrays
- Started
- Last post
- 5 Responses
- effour
Stupid PHP question of the day, but i'm looking to declare variables for an array.
I want to declare the variable like:
$colors = "AWHT,CLAY";For the array:
$b = array($colors);Not working though...
Any help would be greatly appreciated!
Thx.
- jadrian_uk0
Declare the array in a normal manner then access its values, what your doing is impossible and makes no sens.
- might be possible but makes no sens, only if you want to waiste timejadrian_uk
- ernexbcn0
$b = explode(",",$colors);
There you go.
- yep, no point though, it's actually more typinganimatedgif
- ernexbcn0
You can also:
$b = array("AWHT,CLAY");
- ernexbcn0
^ sorry that's wrong, here:
$b = array("AWHT","CLAY");