Function __global->fix_id

Definitions

sources/global3.php

  • Make a value suitable for use in an XML ID.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$param string No No required parameter N/A N/A The value to escape
$simplified boolean No No False N/A N/A Generate simplified IDs

Returns

  • The escaped value
  • Type: string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Make a value suitable for use in an XML ID.
 *
 * @param  string $param The value to escape
 * @param  boolean $simplified Generate simplified IDs
 * @return string The escaped value
 */

function fix_id(string $param, bool $simplified = false) : string