Skip to content

Instantly share code, notes, and snippets.

@objectivehtml
Created October 1, 2013 13:29
Show Gist options
  • Select an option

  • Save objectivehtml/6778455 to your computer and use it in GitHub Desktop.

Select an option

Save objectivehtml/6778455 to your computer and use it in GitHub Desktop.
if (ee()->input->post('dynamic_title'))
{
$dynamic_title = base64_decode(ee()->input->post('dynamic_title'));
foreach ($_POST as $key => $value)
{
if (is_string($value) && strstr($dynamic_title, '['.$key.']') !== FALSE)
{
$dynamic_title = str_replace('['.$key.']', $value, $dynamic_title);
}
}
$_POST['title'] = $dynamic_title;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment