Shoping cart code using a loop to print multiple times
Security

It's unclear where $cat comes from, but if it can possibly be user supplied (eg when it comes from a GET/POST request, or when it comes from the database where it might have been placed by a user), you should use prepared statements to prevent SQL injection.

You should also not be using mysql_* as it's deprecated.

Also, you should always prevent XSS when echoing data that might be user supplied.

Queries in array

Your approach of using an array to handle the 9 queries whose results should be handled the same is ok, but it would be better if you extracted your foreach loop into a separate function and then called that function with the queries (or better yet their result). Doing it that way would increase readability and reusability of your code.

Reduce amount of queries

You could remove the amount of queries you use by using or, which should increase the performance of your code. So instead of asking 

SELECT * FROM products WHERE rowno=1 and colno=1 and pageno=1 and productLine like '$cat'";
SELECT * FROM products WHERE rowno=1 and colno=2 and pageno=1 and productLine like '$cat'";


You could just ask

SELECT * FROM products WHERE ((rowno=1 and colno=2 and pageno=1) or (rowno=1 and colno=2 and pageno=1)) and productLine like '$cat'";


This could be further simplified, and the other queries could be added as well, but honestly, I'm not quite sure if it wouldn't be easier to change your database schema. I'm not quite sure how it currently works though. 

Misc


all your SQL keywords should be all uppercase to increase readability, not just some.
your comments all just reflect what the code just told me, so you can just remove them.
use proper indentation to increase readability.
select the concrete fields that you want, don't just select *.
move style information in it's own css file.
you forgot the opening and closing table tags.
why use like? it seem you want equality?


With some of these changes applied, your code might loop something like this:

$dbh = new PDO([...]); 
printShoppingCart(getByCat($pdo, $cat, "SELECT var1, var2, var3, var4, var5 FROM products WHERE rowno=1 AND colno=1 AND pageno=1 AND productLine=:line"));
[...]

function getByCat($pdo, $ca, $query) {
    $stmt = $dbh-&gt;prepare($query);
    $stmt-&gt;bindParam(':line', $cat);
    return $stmt-&gt;fetch();
}

function printShoppingCart($vars) {
    echo "&lt;table&gt;
    &lt;tr&gt;
        &lt;td&gt;" . htmlspecialchars($vars[0], ENT_QUOTES, 'UTF-8') . "&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;img alt='' src='" . htmlspecialchars($vars[1], ENT_QUOTES, 'UTF-8') . "' style='height: 151px; width: 214px' /&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;
            RS " . htmlspecialchars($vars[2], ENT_QUOTES, 'UTF-8') . "&amp;nbsp;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;" . htmlspecialchars($vars[3], ENT_QUOTES, 'UTF-8') . "&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt;&lt;img alt='' src='divider.png' style='height:25px;
                 width:207px'/&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;
            " . htmlspecialchars($vars[4], ENT_QUOTES, 'UTF-8') . "&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;Details&lt;/td&gt;
    &lt;/tr&gt;&lt;/table&gt;";
}


There are more improvements that can be made, but I think this would be a good start.