This is my second using kirby, I’m very much a noob in php and how kirby functions so forgive me. I need to convert a string into a safe string with no spaces. This my current code:
(Please note that $string is not really a string this case; $page->title() returns an object of type field, which is converted to a string by the __toString() magic method.)
If you needed $string to be a real string, you could use the value() field method: