I am attempting to allow a user to create an array of index's which are then added to an array with a percentage associated with it. Here is an example:
EX1
$pages[] = array('index1.php','25');
$pages[] = array('index2.php','25');
$pages[] = array('index3.php','50');
or
EX2
$pages[] = array('index1.php','25');
$pages[] = array('index2.php','75');
or even
EX3
$pages[] = array('index1.php','25');
$pages[] = array('index2.php','25');
$pages[] = array('index3.php','25');
$pages[] = array('index4.php','25');
I would like to then create a file with the following contents:
OUTPUT EX1
index1.php
index2.php
index3.php
index3.php
OUTPUT EX2
index1.php
index2.php
index2.php
index2.php
OUTPUT EX3
index1.php
index2.php
index3.php
index4.php
Would I just take the sum of $page[][1] and divide by the number of items in the array?