$params = array( 'name' => 'John Doe', 'email' => 'john@example.com', 'interests' => array('hiking', 'cooking', 'reading') ); $url = 'https://example.com?' . t3lib_div::implodeArrayForUrl($params); // Result: https://example.com?name=John%20Doe&email=john%40example.com&interests%5B%5D=hiking&interests%5B%5D=cooking&interests%5B%5D=reading
$arr = array('foo', 'bar', 'baz'); $custom_separator = '|'; $custom_encoding = function($value) { return str_replace('a', 'A', rawurlencode($value)); }; $result = t3lib_div::implodeArrayForUrl($arr, $custom_separator, $custom_encoding); // Result: fooAbarAbazBased on the naming convention, it is likely that this function is part of the TYPO3 Core library, specifically the "t3lib_div" package.