Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Am I able to use the "and" there?

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

860 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