Solved

Am I able to use the "and" there?

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
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.

747 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

11 Experts available now in Live!

Get 1:1 Help Now