<?php
$a = [];
$a[0] = "<table style='color:; text-align: left;'>
<tr>
<td>Processor";
$a[1] = "</td>
<td> Intel Core 2 Duo - E8400";
$a[2] = "</td>
</tr>
<tr>
<td> Clockspeed";
$a[3] = "</td>
<td> 3.0 GHz";
$a[4] = "</td>
</tr>
<tr>
<td> Memory";
$a[5] = "</td>
<td> 4 GB";
$a[6] = "</td>
</tr>
<tr>
<td> Harddisk";
$a[7] = "</td>
<td> 250 GB";
$a[8] = "</td>
</tr>
<tr>
<td> Video-adapter";
$a[9] = "</td>
<td> VGA, Display";
$a[10] = "</td>
</tr>
<tr>
<td> Netwerkcard";
$a[11] = "</td><td> 1000 mbps LAN";
$a[12] = "</td>
</tr>
<tr>
<td> Optical drive";
$a[13] = "</td><td> DVD-Rewriter";
$a[14] = "</td>
</tr>
<tr>
<td> Operating system";
$a[15] = "</td><td> Windows7 or 10 Pro";
$a[16] = "</td>
</tr>
<tr>
<td> Warranty";
$a[17] = "</td><td> 2 years</td></tr></table>";
foreach ($a as &$e) {
$e = trim($e);
}
$joined = join($a);
$stripped = strip_tags($joined,"<td>");
$replaced = str_replace(["<tr>","</td>"],["*","*"],$stripped);
$arr = explode("*",$replaced);
print_r($arr);
- Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 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
- Array
(
[0] =>
<td>Processor
[1] =>
<td> Intel Core 2 Duo - E8400
[2] =>
<td> Clockspeed
[3] =>
<td> 3.0 GHz
[4] =>
<td> Memory
[5] =>
<td> 4 GB
[6] =>
<td> Harddisk
[7] =>
<td> 250 GB
[8] =>
<td> Video-adapter
[9] =>
<td> VGA, Display
[10] =>
<td> Netwerkcard
[11] => <td> 1000 mbps LAN
[12] =>
<td> Optical drive
[13] => <td> DVD-Rewriter
[14] =>
<td> Operating system
[15] => <td> Windows7 or 10 Pro
[16] =>
<td> Warranty
[17] => <td> 2 years
[18] =>
)
- 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
Array
(
[0] =>
<td>Processor
[1] =>
<td> Intel Core 2 Duo - E8400
[2] =>
<td> Clockspeed
[3] =>
<td> 3.0 GHz
[4] =>
<td> Memory
[5] =>
<td> 4 GB
[6] =>
<td> Harddisk
[7] =>
<td> 250 GB
[8] =>
<td> Video-adapter
[9] =>
<td> VGA, Display
[10] =>
<td> Netwerkcard
[11] => <td> 1000 mbps LAN
[12] =>
<td> Optical drive
[13] => <td> DVD-Rewriter
[14] =>
<td> Operating system
[15] => <td> Windows7 or 10 Pro
[16] =>
<td> Warranty
[17] => <td> 2 years
[18] =>
)
preferences:
269.93 ms | 403 KiB | 288 Q