Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8170425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:07:39+00:00 2026-06-06T21:07:39+00:00

This line: {$data[bank_data][Arrangement][id]} returns the following error: PHP (5.3.9) ERROR (E_USER_ERROR): File: Smarty.class.php Line:

  • 0

This line:

{$data["bank_data"]["Arrangement"]["id"]}

returns the following error:

PHP (5.3.9) ERROR (E_USER_ERROR):
File: Smarty.class.php
Line: 1092
Type: Smarty error: [in tke-g-admin_scopeofwork.tpl line 10]: syntax error: unrecognized tag: $data[“bank_data”][“Arrangement”][“id”] (Smarty_Compiler.class.php, line 446)

This line:

{$data.bank_data.Arrangement.id}

does not return error. It works correctly.

So, why the first section is wrong? How to use [] to access array.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T21:07:40+00:00Added an answer on June 6, 2026 at 9:07 pm

    Judging from the error you posted, you’re using Smarty2. The Docs give you two options for accessing arrays:

    {* for string indexes *}
    {$some.array.value}
    {* for numeric indexes *}
    {$some[0][1]}
    

    you can use a variable to provide an index like so

    {assign var="key" value="array"}
    {$some.$key.value} == {$some.array.value}
    

    using that “trick”, you can also access string indexes containing “special characters” such as ., [] or .


    Smarty3 is a bit more flexible in that way:

    {$some.{"hello world"}.array["array"]['foo']}
    

    oddly enough {$foo[bar]} is not parsed properly (in Smarty 3.1.10). Threw that on the todo list, though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my PHP file, I use this line to pull data from my mySQL
Because data from file look like this: line 1 is name (first last), next
I'm trying to load a .json file with this line: $.getJSON('engines.json',{},function(data){ alert(data); }); If
I am getting this error: Data at the root level is invalid. Line 1,
I have this error NOTICE: UNDEFINED VARIABLE: LOGO IN C:\WAMP\WWW\SITE\TOOLS\SMARTY\SYSPLUGINS\SMARTY_INTERNAL_DATA.PHP ON LINE 291 CALL
i have this line in the file: ,2,353867835022;11,353681041426390,272023201187741,272-02f-20017-06609,353854100352;11,,,,,,,0854100352,3,00,,O,D,DATA,,,7124395,,,17687,16,HPLMN,M20MSS_TTFILE_8377_20110528170245,M20MSS,W30B22I;0GRI3,1,20110528130013,170054,1,41,,,,,,,,0,,,,,,,,,,,,,,,,,,353868001820,,,,b60a5c0014,1:353867835022::::0854100352::353854100352,,,,,,,, Yes, this is a comma, separated
I have this line: <input class='submit_img' type=image onclick='ax_update_mood();' src=/images/rainbow/gobuttonbluesmall.png value=Submit alt=Submit></td> ...then I have
The response data in my test has this line: <head><title> My Title </title><meta charset
I am using this line of code to get two data entries from an
I sent a multi-line data with length greater than 20. I'm sure of this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.