That's because on each iteration of the loop, the query is executed again, which means that unless the licenser table is empty, the loop will be an infinite loop. A solution is to call getLicenser() once before the loop.
A better solution in terms of design is to make getLicenser() return an array, and then loop through this array. This has the advantage of decoupling the database layer from the code that prints the data, but is slightly less efficient in that you end up making two passes over the same data set instead of one:
<?php
function getLicensers() {
$query = "SELECT Company, Website FROM licenser";
$result = mysql_query($query) or die(mysql_error());
$icensers = array();
while ($row = mysql_fetch_assoc($result)) {
$licensers[] = $row;
}
return $licensers;
}
// ...
foreach (getLicensers() as $licenser) {
echo "<tr>"
. "<td>" . htmlspecialchars($licenser['Company']) . "</td>"
. "<td>" . htmlspecialchars($licenser['Website']) . "</td>"
. "</tr>";
}
?>
Incidentally, I renamed getLicenser() to getLicensers() to reflect the fact that it returns multiple "licensers". Note also my use of [man]htmlspecialchars/man.