Hey guys, being a bit of a novice at PHP I'm struggling with this function.
I want to choose a random word inside the {} to make a different sentence each time I reload my page. The "|" separates each word

I don't think its a lot of code but could someone help me or point me in the right direction? I was hoping someone had made similar but cant seem to find any php code on the net.

Code:
<?php
$text = "The {quick|slow|reasonably paced} {brown|green|blue|pink} {fox|goat|rat|camel}
{jumped|walked|hopped} {over|past|under} the {lazy|tired|boring} {dog|cat|stoat}";

echo Spin($text);
}
?>