get_loop_records — Get records from the view for iteration.

Loop-related functions

Summary

get_loop_records($recordsVar, $throwException = true)

Get records from the view for iteration.

Note that this function will return an empty array if it is set to the records variable. Use has_loop_records() to check if records exist.

Parameters:
  • $recordsVar (string) – The name of the variable the records are stored in.
  • $throwException (boolean) – Whether to throw an exception if the $recordsVar is unset. Default is to throw.
Returns:

array|bool

Usage

Examples

See Also