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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:37:19+00:00 2026-06-18T16:37:19+00:00

This is an amateur question (so apologies in advance if im overlooking something really

  • 0

This is an amateur question (so apologies in advance if im overlooking something really obvious but i’ve been hunting around PHP.net for some clues but havent figured it out yet), im deciphering this code someone else did for a friends site and kind of just got lost.

what the code is doing is creating an array for a database, and then the site is calling the information back based on time stamps and the sort. for some reason some things aren’t showing up so i’m just trying to get my head through it:

$TYPES_EXPO = array("Type1","Type2","Type3","Type4","Type5","Type6","Type7");

$currentarray = $debe->runSql("SELECT * FROM expositions WHERE from<='$nu' AND to>='$nu' ORDER BY from");

if(count($currentarray)>0)
    echo "<h1>Current Exhibitions</h1>";

for($i=0; $i<count($currentarray);$i++)
{
    echo "<b>" . $currentarray[$i][3] . "</b>";

so in that last line, what is the [3] referencing? theres more of it in other parts of the code, different integers such as [6] and [7] in that similar configuration which seem arbitrary to me, just can’t seem to get my finger on it…

  • 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-18T16:37:21+00:00Added an answer on June 18, 2026 at 4:37 pm

    The 3 is referencing the 4th element (0 is the first element) inside the multidimensional array $currentarray.

    So for example you have an array $person

    mike
        male
        blue
        75
        31
    jack
        male
        brown
        80
        21
    

    $person[1][3] would refer to the integer 21.

    I hope this helps 🙂

    //edit: just as a tip, don’t use count() in the foreach. Assign a variable vefore so the function doesn’t get called a thousand times when you have thousand array items.

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

Sidebar

Related Questions

I know this is probably a really amateur question, but I can't figure this
This seems like a really amateur question, in my opinion, but nonetheless it's still
I know that this may be an amateur question but for some reason I
Alright I know this is more than likely a amateur question but I have
This is a very amateur question (don't rate me down for it) but how
OK, this is an amateur question but I am having the most trouble displaying
this may be an amateur question, but here it goes. I have three clases:
Hope this question is not stupid since I am an amateur web designer. I
Sorry if this seems like a silly question - I am an amateur when
forgive me for being a regex amateur but I'm really confused as to why

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.