text_to_id

Text-related functions

Summary

text_to_id($text, $prepend, $delimiter = -)

Convert a word or phrase to dashed format, i.e. Foo Bar => foo-bar.

This is primarily for easy creation of HTML ids within Omeka

<ol>
<li>convert to lowercase</li> <li>Replace whitespace with -</li> <li>remove all non-alphanumerics</li> <li>remove leading/trailing delimiters</li> <li>optionally prepend a piece of text</li>

</ol>

Parameters:
  • $text (unknown) –
  • $prepend (unknown) –
  • $delimiter (unknown) –

Usage

Examples

See Also

Project Versions

Table Of Contents

Previous topic

strip_formatting

Next topic

text_to_paragraphs

This Page