![]() |
anchor question - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: anchor question (/showthread.php?tid=30904) |
anchor question - El Forum - 05-30-2010 [eluser]dimaomni[/eluser] hello guys! when I just output $marks all has been outputed good. about output - it is table where is cells with marks and empty cells when I've started used anchor function in empty cells has outputed links. So how to avoid this situation ? There is some piece of code: Code: foreach ($output_array as $key=>$marks) Thanks! anchor question - El Forum - 05-30-2010 [eluser]pickupman[/eluser] I believe it is still outputted because it exists. You have not used any typecasting, so 0 exists. You may want to try Code: <?=($marks != '0') " " : '';?> anchor question - El Forum - 05-30-2010 [eluser]Unknown[/eluser] foreach ($output_array as $key=>$marks) { ?> <td><?=anchor('index.php/adminka/'.$marks, $marks)?> <?=($marks === FALSE) ? " ":NULL // however if $marks = 0, it output &npsp;?> </td> |