Hello,
I need a php script that will do the following,
1, import a csv file like this:
keyword,cost,sales,ctr,income
petit chat vert,2.5,1,2.3,100
chat,10,2,1,20
grand chien,5,4,2.2,50
2) The script will compile data for EACH INVIDUAL WORD and make the sum and add a column with the number of time a word have been counted.
petit,2.5,1,2.3,100,1
chat,12.5,3,3.3,120,2 <--- (2.5 + 10), (1+2), (2.3 + 1), (100 + 20), (chat appear 2 times in the list)
vert,2.5,1,2.3,100,1
grand,5,4,2.2,50,1
chien,5,4,2.2,50,1
3) You must divide column CTR by the new column you created at step 2 and create a new column:
petit,2.5,1,2.3,100,1,2.3
chat,12.5,3,3.3,120,2,1.65 <--- (3.3 / 2 = 1.65)
vert,2.5,1,2.3,100,1,2.3
grand,5,4,2.2,50,1,2.2
chien,5,4,2.2,50,1,2.2
Must be well optimized ! Could contain 10 000+ lines !