I want to do something very simple....
all of my post variables should be in separate regular variables that start with '$p_'.
Usually I do something like this:
foreach ($_POST as $k=>$v) $$k = $v;
so I assumed this would work:
foreach ($_POST as $k=>$v) $p_$k = $v;
looking back, I shoulda known that would hand me an error... but not to be deterred I do this:
foreach ($_POST as $k=>$v) $p_{$k} = $v;
this also didn't work... but it didn't error... in my debugging I found that echoing $p_{$k} works juuuust fine. so I decide to sift through all my defined vars...
echo preg_replace('/ /', " ", preg_replace('/\n/', "<br>", print_r(get_defined_vars(), true)));
aaaand lo! and behold! and all that jazz!
[p_] => Array
(
[form_type] => delete
[type] => q
[id] => 1
[c_id] => 1
)
wtf????? how do I fix this???? I want p_form_type and p_type, and p_id!!! not an array!!!! an array defeats the whole purpose :-(