Compare an id to an array in PHP MySQL -
i have array in while lets "while a",like this:
myarr=array(); while($row = mysql_fetch_assoc($result)) { $myarr[$kodetb]= $kuranggesek; echo "kodetb=".$kodetb."value=".$myarr[$kodetb]."<br>"; }
and result displays:
kodetb=tb201506114 value=7001500 kodetb=tb201602179 value=8204000 kodetb=tb201602186 value=200000 kodetb=tb201602321 value=3500000 kodetb=tb201602322 value=150000 kodetb=tb201602327 value=500000
and have query in while let "while b ":
while($row3 = mysql_fetch_assoc($result3)) { $kodetbori=$row3['kodetb']; //this id of while b //what trying accomplish want check like: start loop array sintax if $kodetbori_in_while_b==$kodetb_in_while_a) { echo value of $myarr[$kodetb]in while } end }
please help.. thanks.
Comments
Post a Comment