Multidimensional $_POST


Posted on 16th Feb 2014 07:03 pm by admin

Hello

How to get a single array from array of array (2 - dimension).
For example I have a form:

Line number On/Off | Expand/Contract <input type="text" name="personal[name]" id="name" maxlength="50" value="Kasia"/> <input type="text" name="personal[surname]" id="surname" maxlength="50" value="Nova"/> //etc...other input fields with different array

In my php code I want to take, an array personal form $_POST and assign it to new variable:

Line number On/Off | Expand/Contract $personal_array = $_POST['personal'];$another_array = $_POST['other']etc...

But it doesn't work
Could anybody help me?

Regards

No comments posted yet

Your Answer:

Login to answer
206 Like 9 Dislike
Previous forums Next forums
Other forums

Session problem?!?
Hello All! I am very new to the php world but I am working on fixing things that a previous programm

progress bar...need expert opinion of experienced webmaster
Hey guys, quick question:

I want to display a progress bar when I upload files, but I am not

Firewall / visited websites logger
Hi. I have a firewall implementation and I want to log all the websites visited on the machine. S

pspell
using pspell, is it possible to get words that would be best in the current phrase?

For examp

Advice on how to delete a mysql row using my form
Hi,

I am very new to php and am struggling to work out how to delete a portfolio item (a row

Displaying Site Logo/Icon on a Title tag
really need some help out here. I want to insert a Logo/Icon just like the one close to the "PH

Text Not Displaying Correctly With PHP:GD
I recently moved servers and since then I have noticed that one line of text is showing weirdly.

Not reloading page after php form submit
Hello helpful souls out there. You guys have come through for me in the recent past and I'm hoping s

Passing Arguments to execlp()
I'm writing a program that mimics a unix shell. It's supposed to take commands with arguments and ex

mysql_real_escape_string
Let me preface this that I am very much a PHP noob, but I have some SQL training (not necessarily My

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash