I have the following code:
$pollids = "pollids.txt";
$contents = file_get_contents($pollids);
list($pollid) = explode(',', $contents);
echo $pollid;
This opens a text file containing a comma separated list of text: value1,value2,value3 etc...
However it only echo's the first piece of text in the file. How can I get it to loop/fetch them all?
Secondly, once I have these values, perhaps stored in an array, can i feed them into this piece of script?
$summize = new summize;
$search = $summize->search('searchterm');
$text = $search->results[0]->text;
So that ('searchterm') is replaced by each value in the file? Again i suspect some kind of loop within a loop?