A
Anonymous
Guest
I have this loop which goes through a text list of words and puts them in a URL and array:
What I need to do is assign $data a number (important that it be a number and not text etc) after each foreach loop, so that after each loop there is something like $data0001, then $data0002, etc.
Ultimately, each dynamically created variable will then store the CSV values such as $data0001[0], $data0001[1], and so on.
PLEASE HELP!!
Code:
<?php
foreach($word as $wd){
$fp = fopen("http://www.anywhere.com/{$wd}","r");
$data = fgetcsv ($fp, 1000, ",");
fclose ($fp);
}
?>
What I need to do is assign $data a number (important that it be a number and not text etc) after each foreach loop, so that after each loop there is something like $data0001, then $data0002, etc.
Ultimately, each dynamically created variable will then store the CSV values such as $data0001[0], $data0001[1], and so on.
PLEASE HELP!!