i have 2 PHP files, config.php and confignw.php as follows,
config.php
$html = array(
[update_item_in_store] => Array
(
[header] => default_header.php
[body] => update_item_in_store.php
[footer] => default_footer.php
)
[user_followed] => Array
(
[header] => default_header.php
[body] => user_followed.php
[footer] => default_footer.php
)
[updated_account_settings] => Array
(
[header] => default_header.php
[body] => updated_account_settings.php
[footer] => default_footer.php
)
);
$cml = array
(
"default_header",
"default_body",
"default_footer"
);
confignw.php
$html = array(
[add_item_in_store] => Array
(
[header] => default_header.php
[body] => add_item_in_store.php
[footer] => default_footer.php
)
[user_followed] => Array
(
[header] => default_header.php
[body] => user_followed_new.php
[footer] => default_footer.php
)
);
$cml = array
(
"default_skeleton"
);
And both the files are included in a file called common.php,
And the result should come as merging of both as follows,
Expected Result:
$html = array(
[update_item_in_store] => Array
(
[header] => default_header.php
[body] => update_item_in_store.php
[footer] => default_footer.php
)
[user_followed] => Array
(
[header] => default_header.php
[body] => user_followed_new.php
[footer] => default_footer.php
)
[updated_account_settings] => Array
(
[header] => default_header.php
[body] => updated_account_settings.php
[footer] => default_footer.php
)
[add_item_in_store] => Array
(
[header] => default_header.php
[body] => add_item_in_store.php
[footer] => default_footer.php
)
);
$cml = array
(
"default_header",
"default_body",
"default_footer",
"default_skeleton"
);
Look at the value added in both arrays from the array in the file confignw.php
and note that $html[user_followed][body] is changed. But what is happening is, only the second files' values are coming. So how to achieve this expected result? Any ideas or suggestion are welcome...