$i['qty'] is a variable that I want to write to a file. The following line gives me an error or unexpected ".".
fwrite($fx, .$i['qty'].);
What is the correct syntax for this?
Variables in fwrite function
Moderator: General Moderators
- becky-atlanta
- Forum Commoner
- Posts: 74
- Joined: Thu Feb 26, 2009 6:26 pm
- Location: Atlanta, GA
-
Mark Baker
- Forum Regular
- Posts: 710
- Joined: Thu Oct 30, 2008 6:24 pm
Re: Variables in fwrite function
The correct syntax is without the dots that the error tells you you shouldn't have
Code: Select all
fwrite($fx, $i['qty']);- becky-atlanta
- Forum Commoner
- Posts: 74
- Joined: Thu Feb 26, 2009 6:26 pm
- Location: Atlanta, GA
Re: Variables in fwrite function
Thanks, Mark! That works. 