[PHP] Q regarding recursive function

2001-12-06 Thread Bart Verbeek
Hello, I'm using the following function: >>BEGIN CODE<< $q_cat ="SELECT cat_id, cat_naam, cat_parent_id FROM cat"; $r_cat = mysql_query($q_cat) or die ("Invalid Query fout Q=cat"); if ($r_cat) $n=0; if (mysql_num_rows($r_cat) > 0) while ($row_cat = mysql_fetch_array($r_cat))

[PHP] Warning - how serious, how to eliminate

2001-09-07 Thread Bart Verbeek
Hello people, I've got a question regarding the follwing scripts that gives an error. When I execute the scripts below I get an warning-message: - Warning: Division by zero in ./scripts/fasen_include.php on line 47... This is the script I use. When the vars are set the value has to be added to

[PHP] calculating the average of arrays

2001-09-04 Thread Bart Verbeek
Hello, I want to calculate an average from the following variables/arrays a - $f[$index][f_d1_perc] with $f[$index][f_d1_weight] b - $f[$index][f_d2_perc] with $f[$index][f_d2_weight] c - $f[$index][f_d3_perc] with $f[$index][f_d3_weight] d - $f[$index][f_d4_perc] with $f[$index][f_d4_weight] e