I find it hard to write PHP .and "straight when recording to a file in the script. I'm new, so this looks confusing. The book does this:
$outputstring = $date."\t".$tireqty." tires \t".$oilqty." oil \t".$sparkqty." spark plugs\t\$".$totalamount."\t". $address."\n";
The question is what is the appropriate placement for periods and quotes. Because of how it all came together, I don’t know what they should be attached to. Should each variable be there ".$VARIABLE."or is it for tabs such as \t". I want to reorder it, so there is a line segment there, followed by a variable, then a new line. For example:
$outputstring = $date."\n\ Tires: ".$tireqty."\n\ Oil: ".$oilqty."\n\ Spark Plugs: ".$sparkqty."\n\$".$totalamount."\n".address."\n";
Will this work? I do not have a php server on the machine I am testing on. I hope this changes a little, basically I'm not sure what all the punctuation is for. Thanks.
source
share