Transforms data from the stats API into CSV.

Notice: this function will return more than one value than what you need because of a bug in the limit logic. Adjust accordingly.


Name Type Description
$rows array Raw data from the stats API.
$table string Table for stats can be views, postviews, referrers, searchterms, clicks.
$limit int The maximum number of records to return.
$summarize null Optional. If set, will summarizes all the records.
$return_array bool|string Optional. If true, return an array, otherwise returns a string.

Return Value

array: Fresh tasty data

Ready to get started?

Tell us about your needs

Let us lead the way. We’ll help you select a top tier development partner. We’ll train your developers, operations, infrastructure, and editorial teams. We’ll coarchitect your deployment processes. We will provide live support for peak events. We’ll help your people avoid dark alleys and blind corners, and reduce wasted cycles.