| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Weird Smarty Bracket Problem | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I am displaying data from a table and I am unable to modify the column names. The problem is that one of the column names has brackets in it, for example 'ccost[0]'
When I try to display the value of that column using {$product.proddata.ccost[0]} smarty thinks I am trying to display a value of an array 'ccost' Is there any way to trick smarty into using 'ccost[0]' as the actual fieldname and not a reference to an array? Thanks, Andy
__________________
Andy Melichar, Tech Director - REBEL INTERACTIVE - andy@rebel-interactive.com - X-Cart version 4.1.3 |
|||||||
#2
|
|||||||
|
|||||||
![]() I would change the query to rename the field on retrieval. e.g.
Code:
Another option might be: Code:
__________________
Manuka Bay Company X-Cart Version 4.0.19 [Linux] UGG Boots and other fine sheepskin products http://www.snowriver.com |
|||||||
#3
|
|||||||
|
|||||||
![]() Thanks - the assign var solution worked perfectly.
__________________
Andy Melichar, Tech Director - REBEL INTERACTIVE - andy@rebel-interactive.com - X-Cart version 4.1.3 |
|||||||
|
|||
X-Cart forums © 2001-2020
|