Mecha CMS

To::snake()

Convert string into snake_case.

2.0.0Static

To::snake(string $in, $accent = true);

Example:

$A = To::snake('123 foo bar baz');
$B = To::key('123 foo bar baz');

Result:

$A = '123_foo_bar_baz';
$B = '_123_foo_bar_baz';