Jump to content

1+ values on function


TheSky

Recommended Posts

this is part of my code how should i make fwrite to get in txt file name,Level,CT,Kills,Deaths,killdeaths,AS values ?

any help will be welcome

$file="$name.txt";
$open=fopen($file,"a");

if($open){        
    fwrite($open,$name,$Level,$CT,$Kills,$Deaths,$killdeaths,$AS);
        fclose($open);
	}

Link to comment
https://forums.phpfreaks.com/topic/236989-1-values-on-function/
Share on other sites

You most likely need to wrap $name,$Level,$CT,$Kills,$Deaths,$killdeaths,$AS within double quotes. You cannot pass multiple parameters to fwrite

    fwrite($open, "$name,$Level,$CT,$Kills,$Deaths,$killdeaths,$AS");

 

fwrite can only take three arguments, quoted from the manual.

int fwrite ( resource $handle , string $string [, int $length ] )

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.