Jump to content

diplay number of times a value appears in the array???


krs10_s

Recommended Posts

Here is my code i need to work with. so now i need to diplay the amount of times each value appears

<?php
	$text=$_POST['text'];
	$words=explode(' ',$text);
	sort($words);
	foreach($words as $no=>$words)
	{
	print "<tr><td>$no</td><td>$words</td></tr>";
	}
	?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.