How can we get unique elements from any ORDER BY DECREASING OR INCREASING
Posted
by
Mohit
on Stack Overflow
See other posts from Stack Overflow
or by Mohit
Published on 2010-12-29T07:45:57Z
Indexed on
2010/12/29
7:54 UTC
Read the original article
Hit count: 247
Code given below is taken from the stackoverflow.com !!! Can anyone tell me how to get the array elements order by decreaseing or increasing !! plz help me !!! Thanks in advance
$contents = file_get_contents($htmlurl);
// Get rid of style, script etc
$search = array('@<script[^>]*?>.*?</script>@si', // Strip out javascript
'@<head>.*?</head>@siU', // Lose the head section
'@<style[^>]*?>.*?</style>@siU', // Strip style tags properly
'@<![\s\S]*?--[ \t\n\r]*>@' // Strip multi-line comments including CDATA
);
$contents = preg_replace($search, '', $contents);
$result = array_count_values(
str_word_count(
strip_tags($contents), 1
)
);
print_r($result);
© Stack Overflow or respective owner