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 8265197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T04:42:56+00:00 2026-06-08T04:42:56+00:00

I have this array array(1) { [0]=> array(5) { [ppc_acc_name]=> string(9) Test test [ppc_acc_username]=>

  • 0

I have this array

  array(1) { [0]=> array(5)
           { ["ppc_acc_name"]=> string(9)  "Test test"      
             ["ppc_acc_username"]=> string(4) "ttes" 
             ["ppc_acc_password"]=> string(3) "tes" 
             ["ppc_acc_answer"]=> string(3) "trt"
             ["ppc_acc_link_client"]=> string(1) "3" } } 

And I have trying to access the values in the array via a foreach loop. I want to use key string identifiers so I can control the formatting of my loop as it outputs. The problem is that it dosent let me use key string identifiers in my foreach loop.

This loop outputs Test test ttes tes trt 3 which is correct

  <?php foreach ($ppcAccDetails as $details): ?>

    <?php foreach ($details as $detail): ?>

        <?php echo $detail." "; ?>

    <? endforeach; ?>


<? endforeach; ?>

But I want to use the keys $detail[‘ppc_acc_name’] the results output only the first characters.

incorrect result: T t t t 3

  • 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-08T04:42:57+00:00Added an answer on June 8, 2026 at 4:42 am

    You have a nested array. Just do this to access individual items:

    echo $ppcAccDetails[0]['ppc_acc_name'];
    

    In the foreach loop context, you would do this, and get rid of the inner foreach loop.

    <?php foreach ($ppcAccDetails as $details): ?>
         <?php echo $details['ppc_acc_name']; ?>
    <? endforeach; ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this array: string[,] productData = new string[5,7]; I bind it to a
I have this array array 0 => array 'prodid' => string '2' (length=1) 'qty'
I have this array: --- !map:ActiveSupport::HashWithIndifferentAccess search: !map:ActiveSupport::HashWithIndifferentAccess address: test I apply the following
I have this array: array 0 => string '3,6' (length=3) 3 => string '4,5'
I have this array $arr = array('test1', 'test', 'test3', 'var1', 'var5', 'var'); and I
I have this array: [1]=> array(4) { [id]=> string(2) 31 [slug]=> string(11) montpellier [title]=>
I have this array with information string[] aInfo; // Contains information about this person
I have this array : array(2) { [1]=> array(4) { [name]=> string(14) Les Contenants
i have this array called favorites referenced in my app delegate. When i access
I have this array property in my model and would like to see it

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.