Hi,i have a table like this :

<!DOCTYPE html>
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
        <meta charset="UTF-8">

    table{border-collapse: collapse;}
    tr th, tr td{border: 1px solid black;}
       width :100%;
       position: relative;


    $rows = 10;
$columns = 6; //count of cols from WP to PR
$table = '';
for($r=0;$r<$rows;$r++) {
    $table .= "<tr><td>K" . str_pad(($r+1),3,'0',STR_PAD_LEFT) . "</td>".'<th></th>';
        $table .= "<td>".mt_rand(1,100)."</td>";

    $table .= '</tr>';



       $val= $_GET(['knum']);
       echo $val;

    <div id="resize">
    <table width ="100%" class="t1">
            <th id="knum">knumber</th>
            <th id="avr">PR</th>





how would i apply jquary or java script to find average for each of the rows? Thanks

Hi librarycode,

please give us some clarity on your code. so that we can give a best way to solve/guide your question [like how the output will be or your code result is like this or ...etc]


Sorry for confusion,my question is: have the html table with random numbers,how would i calculate an average of each row?