- Smarty 4.1.1 → 4.5.6 (behebt dynamic property deprecations) - Core-Klassen: #[\AllowDynamicProperties] für Admin_role, base, Config, Customer, Customer_group, CustomerGroups, Item, Structure, website - website.class.php: counts[parent_id] initialisieren vor ++ (PHP 8.1) - layout.class.php: HTTP_ACCEPT_LANGUAGE mit isset-Guard - website_init.php: session_status()-Check vor session_start - .htaccess: HTTPS-Redirect via X-Forwarded-Proto (statt SERVER_PORT) - themes/easyshop_advanced/media/: Parent-Theme-Assets nachgezogen - .gitignore: smarty.4.1.1.bak ausschließen
711 B
711 B
count
Returns the number of elements in an array (or Countable object). Will return 0 for null. Returns 1 for any other type (such as a string).
If the optional mode parameter is set to 1, count() will recursively count the array. This is particularly useful for counting all the elements of a multidimensional array.
Basic usage
{if $myVar|count > 3}4 or more{/if}
{if count($myVar) > 3}4 or more{/if}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| 1 | int | No | If set to 1, count() will recursively count the array. |