i created while loop in php but it is gone infinite-the c

 <table width="100%" align="center">      
                                                    <tr>
                    <td align="center" width="100%">
                        <table  width="95%"  border="1px"  cellspacing="1" cellpadding="4">
                                                    <tr>
                                                        <?php 
                                                        $count=1;
                                                        $columns=$no_of_days+2;
                                                        while($count<=$columns)
                                                        {
                                                            if($count=1)
                                                            {
                                                                echo "<td colspan='5'>Owner Name</td>";
                                                            }
                                                           if ($count=2) {
                                                            echo "<td colspan='5'>Unit Name</td>";
                                                            }
                                                            if ($count>2) {
                                                                $cdate=$count-2;
                                                                echo "<td>".$cdate."</td>";
                                                            }
                                                           $count++;
                                                        }
                                                        ?>





                            </tr>
                                                </table>
                                            </td>
                                </tr>
                        </table>

In lines 11 and 15 you're assigning to $count, not comparing it.

thankyou sir ,for solving my problem.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.