This repository have a exemple for how to get randomic data from a PHP array. In this case we are getting a subarray. Check it out!