Click here to Skip to main content
15,911,317 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
PHP
while($fetch_row=mysql_fetch_array($get_stock) && $get=mysql_fetch_array($get_result)){

$field1=$get['field1'];
$field2=$fetch_row['field2'];
}

is there any way?
Please help....
Posted
Updated 10-Nov-14 21:56pm
v2

1 solution

Please remove the "&&" and use the "||"
or
Replace the code with following lines

PHP
while($fetch_row=mysql_fetch_array($get_stock) || $get=mysql_fetch_array($get_result)){
    if(isset($fetch_row))
    {
    $field2=$fetch_row['field2'];
    }
    if(isset($get))
    {
    $field1=$get['field1'];
    }
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900