Counting values with the following code turns no results to my array. Would appreciate any help on what I did wrong thanks.
$xml=simplexml_load_file("sitemap.xml");
$arr = array();
foreach($xml->url as $child)
{
if (isset($child->loc)) {
echo "true";
$arr[] = $child->loc;
} else {
echo "error";
echo $child->loc;
}
}
print_r(array_count_values($arr));
?>for?var_dump($arr)andvar_dump(array_count_values($arr))?