• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 187
  • Last Modified:

I think I'm in a loop

Have I put myself into a loop here?

$i = 0;
while ($i < 2) {
      $i = $i+1;
      if ($i=1) {
            echo "<tr>";
      echo "<td>";
<form action="/admin/delete_provider.php?Company=<?= $strCompanyname ?>" method="post">
  <td width="250">
     <a href="/admin/edit_provider.php?providerID=<?= $providerID ?>" >
       <?= $strCompanyname ?>
     <a href="/admin/confirm_provider.php?Company=<?= $strCompanyname ?>">
       <input type="button" value="Delete" class="btn2">
 echo "</td>";
      if ($i=3) {
            echo "</tr>";
1 Solution
You have wrong if syntax. You should use == (compare) instead of = (change value).
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now