Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Length of for loop to be dynamic

Avatar of Jazzy 1012
Jazzy 1012 asked on
2 Comments1 Solution105 ViewsLast Modified:
I have this code:
          $available = array();
          while ($row3 = mysqli_fetch_assoc($result3))
              $dayt = $row3['day_of_week'];
              $times = $row3['time_window_label'];
              $tt= explode(",",$times);
              $available[$dayt][] = trim($tt[1]);

      for ($x=0; $x<3; $x++)

I want the for loop instead of being < 3 , to be the length of the array that if its 2 rows then just 2 if 3, 3 if more, more. etc.
Avatar of zephyr_hex (Megan)
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answers