if statement gone wrong |
[eluser]snowstar[/eluser]
Hi all, Im wondering if some one can point me in the right direction, i've written an if statement which should only print out results if one varable matchs the other. How ever its displays all the information in the table snippet from my controller Code: $data = array(); snippet from my View Code: <?php if(isset($drecords)) : foreach($drecords as $drow) : ?> Note: $row->invnum is in a for each loop above this and doesnt close till end of page. Im attempting to only print details that $row->invnum match $drow->orderid, Im not sure where im going wrong The whole page is a template which is repeated for each result (from parent for each)
[eluser]Rob @ iFetch[/eluser]
'=' != '==' To elaborate... "The comparison between $my_name and "someguy" was done with a double equal sign "==", not a single equals"="! A single equals is for assigning a value to a variable, while a double equals is for checking if things are equal." from http://www.tizag.com/phpT/if.php
[eluser]dudeami0[/eluser]
Code: $data = array(); That would possibly work, else something like: Code: $data = array(); |
Welcome Guest, Not a member yet? Register Sign In |