PHP için average fonksiyonu…

Friday November 10th 2006, 17:26 pm |   |  Web Teknolojileri | by eser s.

Muhtemelen ihtiyacınız olana dek php’nin bir average fonksiyonu olmadığını bilmiyordunuz. İnsan nasıl olmaz diye düşünüyor ister istemez.. Ama herşeyi de devletten beklememek lazım :)
Zira o kadar basitmiş ki:
  <?php
    
function average($array){
      return 
array_sum($array)/count($array) ;
    }
  ?>


Comments
No Comments   |   Leave a comment  |  Comments RSS on this post.  |   TrackBack URI
No comments yet.

Leave a comment

[required]

[required]



Line and paragraph breaks automatic, e-mail address never displayed,
HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)

You must read and type the 5 chars within 0..9 and A..F, and submit the form.

  

Oh no, I cannot read this. Please, generate a

 
SHATO Web Hosting Services