Welcome Guest, Not a member yet? Register   Sign In
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




Theme © iAndrew 2016 - Forum software by © MyBB