To use this website fully, you first need to accept the use of cookies. By agreeing to the use of cookies you consent to the use of functional cookies. For more information read this page.

Official ZPE/YASS documentationAccess array elements

As of version 1.5.3 arrays including lists, associative arrays and strings can all be directly accessed using the square brackets notation (known as the subscript operator). For example:

$a = [44, 32, 99]
//Will print 44

Previous versions of ZPE must use a function such as the list_get_at_index or the get chained function.

As well as this, it is also possible to go into an array of arrays (or list of lists) as of version 1.6.4. This is achieved due to multiple indexing:

$a = [[44, 32], [99, 23]]
//Will print 32
Code previewClose
Feedback 👍
Comments are sent via email to me.