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

  • SEARCH
  • Home
  • 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 6924517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:40:23+00:00 2026-05-27T10:40:23+00:00

Here is the dump of array, I want to access the values stored in

  • 0

Here is the dump of array, I want to access the values stored in “name” I can’t seem to get that.

Array
(
[Main_photo] => listing_thumbnail16_10858051461322073003.jpg
[ID] => 16
[Kind_ID] => 1
[Account_ID] => 62
[Plan_ID] => 1
[Pay_date] => 2011-11-23 23:29:53
[Featured_ID] => 0
[Featured_date] => 0000-00-00 00:00:00
[Last_show] => 0000-00-00 00:00:00
[Crossed] => 
[Type] => sale
[Shows] => 3
[Status] => active
[Date] => 2011-11-23 23:29:53
[Rating] => 0
[Rating_votes] => 0
[Cron] => 0
[Cron_notified] => 0
[Cron_featured] => 0
[categories] => 
[headline] => asdasd
[price] => 12|euro
[description] => 
[condition] => 1
[title] => 
[lf_site_url] => 
[description_add] => 
[contact_number] => 
[Path] => automobiles
[Key] => automobiles
[Photos_count] => 1
[count_comments] => 0
[Featured] => 0
[name] => Automobiles
[fields] => Array
    (
        [0] => Array
            (
                [Key] => headline
                [Type] => text
                [Default] => 
                [Condition] => 
                [Details_page] => 1
                [name] => Headline
                [value] => asdasd
            )

        [1] => Array
            (
                [Key] => price
                [Type] => price
                [Default] => 
                [Condition] => 
                [Details_page] => 1
                [name] => Price
                [value] => € 12
            )

    )

[listing_title] => asdasd
)
Array
(
[Main_photo] => listing_thumbnail10_11485755481321487877.jpg
[ID] => 10
[Kind_ID] => 1
[Account_ID] => 9
[Plan_ID] => 1
[Pay_date] => 2011-11-17 04:57:45
[Featured_ID] => 22
[Featured_date] => 0000-00-00 00:00:00
[Last_show] => 0000-00-00 00:00:00
[Crossed] => 
[Type] => sale
[Shows] => 4
[Status] => active
[Date] => 2011-11-17 04:57:45
[Rating] => 0
[Rating_votes] => 0
[Cron] => 0
[Cron_notified] => 0
[Cron_featured] => 0
[categories] => 
[headline] => test
[price] => 1|euro
[description] => asdas
[condition] => 1
[title] => 
[lf_site_url] => 
[description_add] => 
[contact_number] => 
[Path] => automobiles
[Key] => automobiles
[Photos_count] => 1
[count_comments] => 0
[Featured] => 0
[name] => Automobiles
[fields] => Array
    (
        [0] => Array
            (
                [Key] => headline
                [Type] => text
                [Default] => 
                [Condition] => 
                [Details_page] => 1
                [name] => Headline
                [value] => test
            )

        [1] => Array
            (
                [Key] => price
                [Type] => price
                [Default] => 
                [Condition] => 
                [Details_page] => 1
                [name] => Price
                [value] => € 1
            )

    )

[listing_title] => test
)

What I am using at the moment is some thing like this:

{foreach from=$listings name='listings_check' item='listings_check'}
{foreach from=$listings_check item='check_array_for_name'}
{$check_array_for_name.name}
{/foreach}
{/foreach}

but this is not returning the required result can some one guide me. Thanks in advance.

l 1 1 6 1 2 0 0 0 s 3 a 2 0 0 0 0 0 a 1 1 a a 1 0 0 A a l 1 1 9 1 2 2 0 0 s 4 a 2 0 0 0 0 0 t 1 a 1 a a 1 0 0 A t l 3 1 8 1 2 9 0 0 s 1 a 2 0 0 0 0 0 C 1 1 a a 1 2 0 A C l 2 1 1 1 2 1 0 0 s 7 a 2 0 0 0 0 0 C 1 t 1 a a 1 0 0 A C 

Above is the output that is shown over there.

  • 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-05-27T10:40:23+00:00Added an answer on May 27, 2026 at 10:40 am

    According to your output, the foreach is looping over the items of each array, instead of over the arrays.

    Concluding from your syntax of the foreach loop, I assume you are using smarty 2.x. In that case I would advise to remove the name attribute or at least rename it to something else than your item attribute as both will result in a variable. As they are currently named identically this means you will be accessing the foreach loop rather than the item.

    See the smarty docs on foreach.

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

Sidebar

Related Questions

I have a std::vector<uint8_t> that contains strings at specific offsets. Here's a shortened dump:
I have a 2D-array that I want to sort based on the second column.
Here is my var_dump: array(2) { [1]=> object(stdClass)#382 (3) { [name]=> string(12) Other fields
Now here's the code: $men = array( array('name'=>'NO.1', 'age' => 11), array('name'=>'NO.2', 'age' =>
Here is the result of var_dump($my_var[id]) on the object I'm having issues with: array(1)
Can anyone tell me what is happening here? <?php // true var_dump('\\ ' ===
Here is a complete example. I want to forbid using A::set from objects casted
Here's the deal: I'm in the process of planning a mid-sized business application that
Here's what I want to do: Given a table PeopleOutfit (id int primary key,
Here's the method. I want to know if I am violating any best practices

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.