Page 1 of 1

$_POST array problem

Posted: Mon Mar 27, 2006 3:17 am
by mekya
Hello,
A page have a array in the form

for example Id[1] .... Id[10]

i sent the page with post to another php page
i wanna get to array in the from of $_POST['Id[1]']

but there is problem,
page don't recognize any array like $_POST['Id[1]']
and i can't get the values of array

how can it be solved?

Posted: Mon Mar 27, 2006 3:32 am
by feyd
php will make them an actual array.

$_POST['id'] will be it.

Posted: Mon Mar 27, 2006 3:45 am
by s.dot
if you're talking about a multidimensional array

like

Code: Select all

Array (
    ['id'] => Array (
        [1] => array id 1
        [2] => array id 2
    )
)
You would acess it via $_POST['id'][1]

[edit] nevermind, i don't think this can be done through post.. but this is what i envisioned from your post

Posted: Mon Mar 27, 2006 10:26 pm
by mekya
thanks...

I tried and your suggestion solved my problem ...

I accessed it via $_POST['id'][1]...