Solved

Am I able to use the "and" there?

Posted on 2007-03-27
1
156 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

895 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now