hi
i've got the fwrite to work and my script works ok, so i've got both bits working seperately, but i'm not sure how i call all of this:
Code:
$sql = "select foo from bar where catid = $cat limit 20";
$result = mysql_query($sql ,$db);
while ($myrow = mysql_fetch_array($result))
{
echo $myrow['something'];
}
into this $scriptoutput:
Code:
$myfile= fopen ("/home/domains/domain.com/public_html/mytxt.txt", "w+");
fwrite($myfile, $scriptoutput);
fclose($myfile;
how do i get that first little script to output into $scriptoutput, that's what i'm stuck on, anyone got any advice?
thanks in advance