$_POST array problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mekya
Forum Newbie
Posts: 9
Joined: Mon Mar 27, 2006 3:10 am

$_POST array problem

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

php will make them an actual array.

$_POST['id'] will be it.
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post 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
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
mekya
Forum Newbie
Posts: 9
Joined: Mon Mar 27, 2006 3:10 am

Post by mekya »

thanks...

I tried and your suggestion solved my problem ...

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