i have this script:
Code: Select all
<?php
$dirarray = (scandir("../../"));
$startcount = 2;
$countall = count($dirarray);
while ($startcount != $countall)
{
$filename = "../../".$dirarray[$startcount]."/pubstermx/inc/pubsterdomainconfig.php";
$homepage = "../../".$dirarray[$startcount]."/index.php";
if (file_exists($filename))
{
if (file_exists($homepage))
{
$tempfile = file($homepage);
$counttemp = count($tempfile);
unset($tempfile[$counttemp -1]);
print_r ($tempfile);
}
}
$startcount++;
}
?>line #
with:
Code: Select all
echo implode(" ",$tempfile);Am i missing something in the implode function? Should i be using something else to put the array into the file?
~Daniel