$id, "description" => $desc); } fclose($f); unlock($category); return 1; } function store_category($id = 0) { global $category; global $cat; if ((!lock($category)) || (!($f = fopen($category, 'w')))) return 0; foreach ($cat as $c) fputs ($f, $c["id"] . " " . $c["description"] . "\n"); fclose($f); unlock($category); return 1; } /* Initialization */ $category = $categorydir . $table . ".cat"; load_category(); ?>