See if anyone can solve my problem. I might be going about this the wrong way but...
I've just called an array out of a database and unserialized it (no problem here). Then I want to break it up into multiple arrays based on values from the first array.
for example:
The first array is: $db = ("a0" => "on");
I need an array: $a = ("a0 => "on); and so on.
Here is some code that makes sense to me, but there's an error with the variablevariable line:
Fatal error: Cannot use [] for reading in FILE
$db = array ("a0"=>"on","a5"=>"on", "b2"=>"on","b8"=>"on", "c4"=>"on","c5"=>"on", "d0"=>"on","d9"=>"on");
foreach ($db as $key => $value)
{
$letter = substr($key,0,1);
$number = substr($key,1);
$$letter[] = $letter$number => $value;
}