• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
using && inside a for each

#1
Question 
i want to use && inside a for each ... im trying and it shows error,,, plz help..

im using it like :
 foreach ($query->result() as $roow) && ($query1->result() as $row1):
Reply

#2
You can't do that.
Reply

#3
I think he wants to do something like multi-threading..
God Bless CI Contributors Smile
Reply

#4
Code:
$result1 = $query1->result();
$result2 = $query2->result();
for ($i = 0, $c = min(count($result1), count($result2)); $i < $c; $i++)
{
    // Use $result1[$i] and $result2[$i]
}
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.