troubleshooting Question

Why can only output 5 element of the array

Avatar of firekiller15
firekiller15 asked on
2 Comments1 Solution172 ViewsLast Modified:
I have a list of student description as follow
This is my table

Studentid        studentdescription
1                  ASIAN
2                  EUPROPIAN
3                  ASIAN
4                  EUPROPIAN
5                  ASIAN
6                  ASIAN  
7                  MIDDLE_EAST

foreach ($this->mapstudent as $student)
             FROM STUDENT
             WHERE studentDescription = \"$student\"";

$result = mysql_query($query);
 $i = 0;
 while($row = mysql_fetch_array($result))
      $this->splitstudentReturn[$i] = $row['studentID']; //get universeid and insert to GETCOMPNUM


i should get output = 1356247
but i only able got 5 element from array as show below

Array ( [0] => 7 [1] => 4 [2] => 2 [3] => 6 [4] => 5 )

some more as you can see the result is reverse it start from
74265 --> why like that

why only five element show from array suppose should be 7 element

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros