I would like to insert value to an array's inner arrays specific item.
So I have an array which is loosing data between functions which I can't finde where and when it should be printed out some values are missing, but I can get these values from an object and I would like to inject the object's items to the array's inner arrays [value] item. In the object I have the same names as in the array.
The objet looks like this
Userinfos Object
(
[address_type] => BT
[address_type_name] =>
[company] =>
[title] =>
[last_name] => Last Name
[first_name] => First Name
[middle_name] =>
[phone_1] => 1234567
[phone_2] =>
[fax] =>
[address_1] => Street address
[address_2] =>
[city] => City
[virtuemart_state_id] => 0
[virtuemart_country_id] => 97
[zip] => 1234
[agreed] => 0
[created_on] => 0000-00-00 00:00:00
[created_by] => 0
[modified_on] => 2012-08-08 22:04:36
[modified_by] => 853
[email] => webmaster@universumpoker.com
[username] => webmaster@universumpoker.com
)
and the array looks like this
Array
(
[email] => Array
(
[name] => email
[value] =>
[title] => E-Mail
[type] => emailaddress
[required] => 1
[hidden] =>
[formcode] => <input type="text" maxlength="100" class="required" value="" size="30" name="email" id="email_field">
)
[last_name] => Array
(
[name] => last_name
[value] =>
[title] => Last Name
[type] => text
[required] => 1
[hidden] =>
[formcode] => <input type="text" maxlength="32" class="required" value="" size="30" name="last_name" id="last_name_field">
)
[first_name] => Array
(
[name] => first_name
[value] =>
[title] => First Name
[type] => text
[required] => 1
[hidden] =>
[formcode] => <input type="text" maxlength="32" class="required" value="" size="30" name="first_name" id="first_name_field">
)
)
As you can see in this array the [value] is empty and in [formcode] the input's value is empty too.
So is there any way to push the Object's values to the array. I was looking into array_push but couldn't figure out how target [value]