Convert string to be all snake_case (lowercase and underscores)
For example, "Hello World" or "hello-world" becomes "hello_world".
Usage
// basic usage
$string = $sanitizer->snakeCase(string $value);
// usage with all arguments
$string = $sanitizer->snakeCase(string $value, array $options = []);
Arguments
Name | Type(s) | Description |
---|---|---|
value | string | |
options (optional) | array |
|
Return value
string
$sanitizer methods and properties
API reference based on ProcessWire core version 3.0.236