You are here

function search_autocomplete_replaceArguments in Search Autocomplete 7.3

Same name and namespace in other branches
  1. 6.2 search_autocomplete.module \search_autocomplete_replaceArguments()

HELP FUNCTION: replace placeholders in the input string

Parameters

$input the string to be replaced:

$args the array of placeholders and values:

File

./search_autocomplete.module, line 99

Code

function search_autocomplete_replaceArguments(&$input, &$args) {
  $modified = FALSE;
  foreach ($args as $key => $data) {
    $input = preg_replace('#' . $key . '#', $data, $input);
    $modified = TRUE;
  }
  return $modified;
}