Sharing a function between snippets

I have a simple php function that pulls a random value from an array, I would like to be able to use that function on different snippets on the same page. I know how to share the arrays and other data using controllers, but I’m not sure how to share a function between the snippets and have it re-roll the value every time.

Any help is appreciated!
I’m a beginner so please be nice, thank you!

You could store your function in a plugin so you can access it from everywhere, see Plugin Basics | Kirby CMS

1 Like

Ahhh thank you, I hadn’t messed around with that feature yet. I knew you guys had something though! Thanks