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

help with multi-update
Now sure how to ask this really....
10g database if that matters.

I have a customer

Format timestamp from mysql
When I tried this:
Code: date("m/d/Y H:i A", $row['timestamp'])
I got 12/31/1969 18:

in php, link returns to the line
When I add a link in a php page, the link word returns to the line (as a
would do)

Examp

matching numbers inside ( )
I know I can match numbers by just [0-9]+, so I thought matching numbers inside ( ) would be somethi

for loop without same $i digits?
Hi,

Can some guru please advise how can I accomplish this with a simple for loop ?

I

BSP Ext - tableView - Sort - NEWBIE
Hi,
I have been trying to get the sort to work. I have defined the column definitions by fillin

Remove values in array2 from array1
I have two arrays.

Array 1 is where the array key holds various different numbers. For exampl

Undefined index: username HELP NEWBIE
I am trying a simple login/logout for my website. It works well with checking if the username exists

Procedural to OOP
John Kleijn said that to avoid writing "crappy code", we should learn OOP and common OO pr

Getting Resource id #11 while trying to connect..
So i tried using "DEFINE" for the first time and im using the variables i defined to conne

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