TPLix

No results for ""

Is Array

2 min read Jun 2, 2026
--- title: is_array and autoseo: enabled: true theme: learn2 child_type: default admin: children_display_order: collection visible: true ---

is_array — Return true if the variable passed to it is an array.

Basic Usage:
{if is_array($myarray)}myarray is an array{/if}
{if !is_array($myarray)}myarray is not an array{/if}
Examples:

Using by operator is array

{if $myarray is array}myarray is an array{/if}

Using modifier is_array

{if $myarray|is_array}myarray is an array{/if}

Using by operator is not array

{if $myarray is not array}myarray is not an array{/if}

Using modifier is_array

{if $myarray|is_array:'!'}myarray is not an array{/if}

Leave a Comment

Not published. Used to notify you on approval.

Comments are moderated before appearing.