Solved

Am I able to use the "and" there?

Posted on 2007-03-27
1
158 Views
Last Modified: 2008-03-06
Is it possible to do something like this?

while ($row = mysql_fetch_array($SQLStrings[0]) and $row = mysql_fetch_array($SQLStrings[1])) {
      $reviewID = $row['reviewID'];
      $strOverall = $row['strOverall'];
      $strCompanyname = $row['strCompanyname'];
      $strProviderservice = $row['strProviderservice'];
        $strAd_size = $row['strAd_size'];
}
0
Comment
Question by:pingeyeg
1 Comment
 
LVL 24

Accepted Solution

by:
glcummins earned 250 total points
ID: 18802221
No, that won't work, but you can use something like:

while ($row = mysql_fetch_array($SQLStrings[0]))
{
    $rowFromOtherArray = mysql_fetch_array($SQLStrings[1]);

    // Code
}

This will pull a row from each array. Note: for this to work, you probably want to ensure that $SQLStrings[1] has at least as many records as $SQLStrings[0].
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question