samoht Posted September 22, 2007 Share Posted September 22, 2007 Hello, New prob. I have a function that returns all the products with the same ItemId. So I will usually have more than 1 row. The problem is I want to display the info from row one different than the rest. basically after I display the first row of product info - I just want a list of the other product names below like: <td colspan="2"><?php for($i=0; $i<$numPd;$i++) { extract($product[$i]); echo $Name ."<br />"; }?></td> but it complains that my array is now empty?? maybe because I already extracted it for the first product? (this code comes first in my page) <?php $product = getProductDetail($ItemId, $CPC); // we have $pd_name, $pd_price, $pd_description, $pd_image, $cart_url $numPd = count($product); extract($product); ?> <table width="100%" border="0" cellspacing="0" cellpadding="10"> <tr> <td align="center"><img src="<?php echo $ImagelsURL; ?>" border="0" alt="<?php echo $Name; ?>"></td> <td valign="middle"> <strong><?php echo $Name; ?></strong><br> Price : <?php echo displayAmount($PriceSell); ?><br> any ideas what I am doing wrong? Quote Link to comment https://forums.phpfreaks.com/topic/70237-return-function-loop-prob/ Share on other sites More sharing options...
cooldude832 Posted September 22, 2007 Share Posted September 22, 2007 you talk about this function, but you don't show the function Quote Link to comment https://forums.phpfreaks.com/topic/70237-return-function-loop-prob/#findComment-352772 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.