<?php
$string = "Mislukte opvragingen: Limburger, De Gelderlander, RTV Noord, Rijnmond, RTV Utrecht, De Telegraaf, Nieuws.nl, Verkeersnet, Leidsch Dagblad, NS Pers, NS Actueel";
function shortenString($string) {
if(strlen($string) > 30) {
echo substr($string, 0, 30 ) . '...';
} else {
echo $string;
}
}
?><!DOCTYPE html>
<html>
<head>
<title>Test</title>
<meta charset="ISO-8859-1">
</head>
<body>
<?php
echo '
<table border="0" width="55%" cellspacing="0" cellpadding="0">
<tr>
<th>ID</th>
<th>Filename</th>
<th>Date Logged</th>
<th>Parsetime</th>
<th>Comments</th>
</tr>
<tr>
<td>6</td>
<td>newsscanner.php</td>
<td>1 feb 2017 om: 11:21</td>
<td>11.9235889</td>
<td>'.shortenString($string).'</td>
</tr>
</table>';
?>
</body>
</html>
- Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.17 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
- <!DOCTYPE html>
<html>
<head>
<title>Test</title>
<meta charset="ISO-8859-1">
</head>
<body>
Mislukte opvragingen: Limburge...
<table border="0" width="55%" cellspacing="0" cellpadding="0">
<tr>
<th>ID</th>
<th>Filename</th>
<th>Date Logged</th>
<th>Parsetime</th>
<th>Comments</th>
</tr>
<tr>
<td>6</td>
<td>newsscanner.php</td>
<td>1 feb 2017 om: 11:21</td>
<td>11.9235889</td>
<td></td>
</tr>
</table> </body>
</html>
- Output for 8.3.5
- Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<meta charset="ISO-8859-1">
</head>
<body>
Mislukte opvragingen: Limburge...
<table border="0" width="55%" cellspacing="0" cellpadding="0">
<tr>
<th>ID</th>
<th>Filename</th>
<th>Date Logged</th>
<th>Parsetime</th>
<th>Comments</th>
</tr>
<tr>
<td>6</td>
<td>newsscanner.php</td>
<td>1 feb 2017 om: 11:21</td>
<td>11.9235889</td>
<td></td>
</tr>
</table> </body>
</html>
preferences:
167.7 ms | 403 KiB | 192 Q