|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
bsmither Smarty Elite
Joined: 20 Dec 2011 Posts: 322 Location: West Coast
|
Posted: Sun Dec 03, 2017 11:43 pm Post subject: Nested Short Syntax Array |
|
|
Trying to use the short syntax for arrays, and I know Smarty can handle one dimension. Smarty is objecting to the following: Code: | {$usps_classes=[
[
'class_id' => 0,
'class_name' => "large_envelope",
'class_friendly_name' => "$LANG.usps.service_first - $LANG.usps.first_class_large_envelope",
],
]} |
Syntax error ... on line 6 "]," - Unexpected "]"
I have not yet tried removing the trailing comma on line 5.
Any obvious errors?
Any corroboration? |
|
Back to top |
|
bsmither Smarty Elite
Joined: 20 Dec 2011 Posts: 322 Location: West Coast
|
Posted: Sun Dec 03, 2017 11:53 pm Post subject: |
|
|
Removed the trailing comma on line 5, Smarty said "Unexpected "]" on line 7.
Removed trailing comma on line 6, it works. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Mon Dec 04, 2017 9:33 pm Post subject: |
|
|
Interesting. Thanks. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|