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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:41:41+00:00 2026-06-17T18:41:41+00:00

i´d like how to iterate through this array to print something like this in

  • 0

i´d like how to iterate through this array to print something like this in an html list ( a foreach or any other loop should do the work…). I´m completely stuck..!

Caballos  Soledad'
    'Paseo a caballo' 
...........
...........
...........
Rancho Valle
     'Camping'
    'Paseo a caballo' 

array (size=10)
  40 => 
    array (size=2)
      'proveedor' => string 'Caballos Soledad' (length=26)
      'servicio' => 
        array (size=1)
          0 => string 'Paseo a caballo' (length=15)
  41 => 
    array (size=2)
      'proveedor' => string 'Caballos Segundo' (length=25)
      'servicio' => 
        array (size=1)
          0 => string 'Paseo a caballo' (length=15)
  64 => 
    array (size=2)
      'proveedor' => string 'Cerro' (length=10)
      'servicio' => 
        array (size=1)
          0 => string 'Camping' (length=7)
  39 => 
    array (size=2)
      'proveedor' => string 'Caballos Nieto' (length=19)
      'servicio' => 
        array (size=1)
          0 => string 'Paseo a caballo' (length=15)
  174 => 
    array (size=2)
      'proveedor' => string 'Hacienda' (length=21)
      'servicio' => 
        array (size=2)
          0 => string 'Paseo a caballo' (length=15)
          1 => string 'Camping' (length=7)
  49 => 
    array (size=2)
      'proveedor' => string 'Campo ' (length=10)
      'servicio' => 
        array (size=1)
          0 => string 'Camping' (length=7)
  241 => 
    array (size=2)
      'proveedor' => string 'Lodge' (length=12)
      'servicio' => 
        array (size=1)
          0 => string 'Paseo a caballo' (length=15)
  258 => 
    array (size=2)
      'proveedor' => string 'Modesto' (length=14)
      'servicio' => 
        array (size=1)
          0 => string 'Paseo a caballo' (length=15)
  294 => 
    array (size=2)
      'proveedor' => string 'Rancho Valle ' (length=18)
      'servicio' => 
        array (size=2)
          0 => string 'Camping' (length=7)
          1 => string 'Paseo a caballo' (length=15)
  38 => 
    array (size=2)
      'proveedor' => string 'Caballos Jose ' (length=22)
      'servicio' => 
        array (size=1)
          0 => string 'Paseo a caballo' (length=15)

I’b been searching for too long… but not find a proper way to do that.
Many thanks in advance

  • 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-17T18:41:42+00:00Added an answer on June 17, 2026 at 6:41 pm
    function my_print_r($array){
        echo '<ul>';
        foreach ($array as $key => $value){
            echo '<li>' . $key;
            if (is_array($value)){
                my_print_r($value);
            }
            else echo ' : ' . $value;
            echo '</li>';
        }
        echo '</ul>';
    }
    

    Hope this will work, just change the formatting as You like 🙂

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

Sidebar

Related Questions

Is it slower to iterate through a list in Java like this: for (int
This is probably an easy question, but I'd like to iterate through the tags
jquery looks like this $.post('JSP/processForm.jsp', $(#Form).serialize(), function(data){ //I want to iterate through every line
I would like to iterate through an array that covers every pixel on my
Does map() iterate through the list like for would? Is there a value in
Here's the situation: I would like to iterate through a table with input controls,
When 'login' button is clicked I would like to iterate through a column in
I would like to randomly iterate through a range. Each value will be visited
I have an array with a series of event IDs organized like this: $event['year']['month']['day']
If I have a 2D array, it is trivial to loop through the entire

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.