piet3
07-04-2005, 09:46 PM
Hi all
Can anynone show me how to echo a variable without any line breaks i.e echo each variable alongside the other one(Note the variable is in a while loop).
Here is the code:(Its used to echo all files in a directory at once)
$d = dir("listings/");
while (false!== ($filename = $d->read())) { if (substr($filename, -4) == '.php')
{
$fp = fopen("listings/".$filename,"r");
$filesize = filesize("listings/".$filename);
$content = fread($fp,$filesize);
echo $content;} * THIS IS THE VRIABLE I WANT ALONGSIDE EACH OTHER, NOT UNDER EACH OTHER *
} $d->close();include_once'footer.php'; exit();
Can anynone show me how to echo a variable without any line breaks i.e echo each variable alongside the other one(Note the variable is in a while loop).
Here is the code:(Its used to echo all files in a directory at once)
$d = dir("listings/");
while (false!== ($filename = $d->read())) { if (substr($filename, -4) == '.php')
{
$fp = fopen("listings/".$filename,"r");
$filesize = filesize("listings/".$filename);
$content = fread($fp,$filesize);
echo $content;} * THIS IS THE VRIABLE I WANT ALONGSIDE EACH OTHER, NOT UNDER EACH OTHER *
} $d->close();include_once'footer.php'; exit();