ok ok
MySQL query, runs it against the database, and returns an array of posts. Second, you have to traverse the result set returned by get_posts with a foreach cycle.
You just need to define an array of parameters and pass it to the get_posts function. WordPress converts that array into a real and secure MySQL query, runs it against the database, and returns an array of posts. Second, you have to traverse the result set returned by get_posts with a foreach cycle.