Time Ago Help
<p>On following function i used 2 identical variables because inside is different language, i need help to replace this variable $periods[$j].= "";</p>

<p>example:</p>

<pre><code>function showdate($time)  
 {  
 $periods = array("second", "minute", "hour", "day", "week", "month", "year", "decade");
 $periods2 =   array("seconds", "minutes", "hours", "days", "weeks", "months", "years", "decade");
 $lengths = array("60","60","24","7","4.35","12","10");  

 $now = time();  

 $difference     = $now - $time;  
 $tense         = "ago";  

 for($j = 0; $difference &gt;= $lengths[$j] &amp;&amp; $j &lt; count($lengths)-1; $j++)   
     {  
     $difference /= $lengths[$j];  
     }  

 $difference = round($difference);  

 if($difference != 1)   
     {
     **/* In this case i need to show me this variable $periods2 */**  
     $periods[$j].= "";
     }  

 return "$difference $periods[$j] $tense";  
 }  
</code></pre>
