PHP format issue


SUBMITTED BY: Guest

DATE: Nov. 18, 2013, 2:53 a.m.

FORMAT: Text only

SIZE: 2.8 kB

HITS: 778

  1. <table border="7">
  2. <tr>
  3. <?php
  4. foreach($colNames as $colName)
  5. {
  6. if ($colName == 'id')
  7. {
  8. }
  9. else
  10. {
  11. echo "<th>$colName</th>";
  12. }
  13. }
  14. ?>
  15. <th>Assign To</th>;
  16. </tr>
  17. <br />
  18. <?php
  19. foreach($data as $row)
  20. {
  21. echo "<tr>";
  22. foreach($colNames as $colName)
  23. {
  24. //echo "<td>".$row[$colName]."</td>";
  25. if ($colName == 'id')
  26. {
  27. }
  28. else
  29. {
  30. echo "<td>".$row[$colName]."</a></td>";
  31. }
  32. }
  33. ?>
  34. <td><select name="cs" id="cs">
  35. <option value='0'>---Select One---</option>
  36. <?php
  37. $result = mysql_query("SELECT id, name FROM users");
  38. while ($line = mysql_fetch_array($result))
  39. {
  40. echo '<option value="' . $line['id'] . '">' . $line['name'] . '</option>';
  41. }
  42. echo" </select></td>
  43. </tr>
  44. </table>";}?>

comments powered by Disqus