I would like to convert: "controllers[page[title_new]]" to "controllers[page][title_new]". So I can fill a form with input fields like:
<?php $name = 'controllers[page[title_new]]' ?>
<input type='text' name='<?= $name; ?>'>
After you submit the form you get $_POST =
array(controllers => array(page => array(title_new = '')));
Now to display this I would like:
<input type='text' name='<?= $name; ?>' value='<?= $_POST[CONVERT($name)]; ?>'>
So is there such a CONVERT built into PHP? Or how could I do it the best way?
*Please note I left out all validation, escaping, htmlentities, etc. out for readability.
Well, the following works: