Im using get_file_contents to create a Array. Below you can see a var_dump of my Array.
How I get this Array?
function remap_alternating(array $values) {
$remapped = array();
for($i = 0; $i < count($values) - 1; $i += 2) {
$remapped[trim($values[$i], ": ")] = trim($values[$i + 1], " ");
}
return $remapped;
}
$mapped = remap_alternating($matches[0]);
foreach($mapped as $key => $val) {
}
Result of: var_dump($mapped);
array(32) {
["<td valign="top" class="maintext"><strong>Age:</strong></td>"]=>
string(137) "<td class="graytext">21 Years. </td>"
["<td valign="top"><strong>Ethnicity:</strong></td>"]=>
string(122) "<td class="graytext">Black</td>"
["<td valign="top" class="maintext"><strong>Location:</strong></td>"]=>
string(152) "<td class="graytext">Dubai, United Arab Emirates</td>"
My question is how can I remove HTML code from this Array?