fscanf problem

From: Date: Mon, 12 Feb 2001 03:01:47 +0000
Subject: fscanf problem
Groups: php.general 
Request: Send a blank email to php-general+get-39166@lists.php.net to get a copy of this message
my code... WRITE TO FILE: if ($item_file = fopen("$thisdir/item.dat", "w")) { fwrite($item_file, "$new_item\n$asin\n$description\namazon"); fclose($item_file); echo "<P CLASS=Normal>$new_item created</P>"; } READ FROM FILE: $item_file = fopen("$thisdir/item.dat", "r"); fscanf($item_file, "%s\n%s\n%s\n%s", $display, $asin, $description, $link); fclose($item_file); PROBLEM: $display comes out correct, but $asin, $descrition and $link are always empty SAMPLE FILE: MyItem 11517 ThisIsMyDecriptionWithoutSpaces amazon - John Vanderbeck - Admin, GameDesign

« previous php.general (#39166) next »