okay, so:
$p = "item";
$value = "2";
now what i want to end up with is this:
$array['itemid'] = 2;
so i do this:
$array[${$p.'id'}] = $value;
i haven't used variable variables to create a key before and i can't find anything on it in the manual. but when i take $array and break it apart the key is empty:
while($b = each($array))
{
$key = $b['key'];
$value = $v['value'];
print "$key: $value";
}
what prints is this:
: 2
there is no key present so i am curious if this is a limitation of php or if it is my error.
any help is appreciated.
btw thanks for the quick response.