Using Wordpress with update_user_meta and php array.
Had a quick question regarding dynamic input fields and posting it to php.
<input type="text" name="test[]" />
These fields get added dynamically as well using jquery which works fine, the issue im having is posting the array individually.
To save this I understand I have to do this.
$test = $_POST['test[]'];
I am using wordpress with this so i am saving the data to user_meta like so.
update_user_meta($user_id, 'test', $test_values);
Now in order for me to post this variable why doesnt this work.
$test = get_user_meta($user_id, 'test');
echo "$test[0]";
//...some more php here and add another variable from test
echo $test[1];
//....etc.
echo $test[2];
Thanks for any help guys and gals