Imtehbegginer Posted February 28, 2007 Share Posted February 28, 2007 I have a huge item file. <?php // MASTER ITEMS SCRIPT BY -ELEMENT // DO NOT CLAIM THIS AS YOUR OWN $items = array( '1' => 'Flu Mask', '2' => 'Black Mask', '3' => 'Butterfly Mask', '4' => 'Zorro Mask', '5' => 'Persian Mask', '6' => 'Wicked Mask', '7' => 'Jolly Front Mask', '8' => 'Iron Mask', '9' => 'Totem Mask', '10' => 'Goblin Mask', '11' => 'Ashura Mask', '12' => 'Orc Mask', '13' => 'Mask of Lies', '14' => 'Mask of Truth', '15' => 'Mask of Venus', '16' => 'Demon Mask', '31' => 'Glasses Frame', '32' => 'Dork Glasses', '33' => 'Thick Framed Glasses', '34' => 'Sunglasses', '35' => 'Charming Sunglasses', '36' => 'Swimming Goggles', '37' => 'Engineer Goggles', '38' => 'Cart Goggles', '39' => 'Red Sunglasses', '40' => 'Blue Sunglasses', '41' => 'Yellow Sunglasses', '42' => 'Silver Sunglasses', '43' => 'Pilot Goggles', '44' => 'Near-Sighted Glasses', '45' => 'X-Ray Glasses', '46' => 'Neo Glasses', '62' => 'Pierrot Nose', '64' => 'Pinocchio Nose' , '73' => 'Santa Beard', '121' => 'Ego Mask', '151' => 'Scream Mask', '152' => 'Nomadic Mask', '153' => 'Mummy Face', '156' => 'Jason Mask', '161' => 'Star Glasses', '162' => 'Matrix Eye', '166' => 'Cherry Blossom Glasses', '171' => 'Rat Tail Mustache', '172' => "Oro's Present", '181' => 'Junon Mask', '201' => 'False Scalp', '221' => 'Tulip Ribbon', '222' => 'Peacock Feather', '241' => 'Royal Crown', '301' => 'Elven Islamic Bandana', '302' => 'Dark Red Beret', '303' => 'Elven Red Beret', '304' => 'Dark Red Leather Beret', '305' => 'Golden Red Leather Beret', '306' => 'Elven Red Leather Beret', '307' => 'Dark Rodeo Hat', '308' => 'Golden Rodeo Hat', '309' => 'Elven Rodeo Hat', '310' => 'Dark Luxurious Rodeo Hat', '311' => 'Golden Luxurious Rodeo Hat', '312' => 'Elven Luxurious Rodeo Hat', '313' => 'Dark Joker Jester', '314' => 'Golden Joker Jester', '315' => 'Elven Joker Jester', '316' => 'Dark Luxurious Joker Jester', '317' => 'Golden Luxurious Joker Jester', '318' => 'Elven Luxurious Joker Jester', '319' => 'Dark Venetian Hat', '320' => 'Golden Venetian Hat', '321' => 'Elven Venetian Hat', '322' => 'Dark Luxurious Venetian Hat', '323' => 'Golden Luxurious Venetian Hat', '324' => 'Elven Luxurious Venetian Hat', '325' => 'Dark Junior Cap', '326' => 'Golden Junior Cap', '327' => 'Elven Junior Cap', '328' => 'Dark Senior Cap', '329' => 'Golden Senior Cap', '331' => 'Elven Senior Cap', '401' => 'Soldier Helm', '404' => 'Golden Soldier Helm', '405' => 'Saint Soldier Helm', '406' => 'Legend Soldier Helm', '409' => 'Iron Helm', '410' => 'Elven Iron Helm', '411' => 'Saint Iron Helm', '412' => 'Holy Iron Helm', '413' => 'Grand Iron Helm', '414' => 'Trunket Helm', '417' => 'Elven Trunket Helm', '418' => 'Saint Trunket Helm', '419' => 'Holy Trunket Helm', '420' => 'Grand Trunket Helm', '421' => 'Chrome Helm', '424' => 'Elven Chrome Helm', '425' => 'Saint Chrome Helm', '426' => 'Holy Chrome Helm', '427' => 'Grand Chrome Helm', '429' => 'Mighty Helm', '430' => 'Mighty Helm', '431' => 'Elven Mighty Helm', '432' => 'Saint Mighty Helm', '433' => 'Holy Mighty Helm', '434' => 'Grand Mighty Helm', '435' => 'Kurash Helm', '438' => 'Elven Kurash Helm', '439' => 'Saint Kurash Helm', '440' => 'Holy Kurash Helm', '441' => 'Grand Kurash Helm', '442' => 'Plate Helm', '443' => 'Plate Helm', '444' => 'Plate Helm', '445' => 'Golden Plate Helm', '446' => 'Elven Plate Helm', '447' => 'Saint Plate Helm', '448' => 'Legend Plate Helm', '501' => 'Spiritual Beret', '502' => 'Spiritual Beret', '503' => 'Spiritual Beret', '504' => 'Golden Spiritual Beret', '505' => 'Saint Spiritual Beret', '506' => 'Legend Spiritual Beret', '507' => 'Green Hat of Witch', '508' => 'Green Hat of Witch', '509' => 'Green Hat of Witch', '510' => 'Elven Green Hat of Witch', '511' => 'Saint Green Hat of Witch', '512' => 'Holy Green Hat of Witch', '513' => 'Grand Green Hat of Witch', '514' => 'Purple Hat of Witch', '515' => 'Purple Hat of Witch', '516' => 'Purple Hat of Witch', '517' => 'Elven Purple Hat of Witch', '518' => 'Saint Purple Hat of Witch', '519' => 'Holly Purple Hat of Witch', '520' => 'Grand Purple Hat of Witch', '521' => 'Violet Beret', '522' => 'Violet Beret', '523' => 'Violet Beret', '524' => 'Elven Violet Beret', '525' => 'Saint Violet Beret', '526' => 'Holy Violet Beret', '527' => 'Grand Violet Beret', '528' => 'Hat of Shadow', '529' => 'Hat of Shadow', '530' => 'Hat of Shadow', '531' => 'Elven Hat of Shadow', '532' => 'Saint Hat of Shadow', '533' => 'Holy Hat of Shadow', '534' => 'Grand Hat of Shadow', '535' => 'Velvet Hat of Witch', '536' => 'Velvet Hat of Witch', '537' => 'Velvet Hat of Witch', '538' => 'Elven Velvet Hat of Witch', '539' => 'Saint Velvet Hat of Witch', '540' => 'Holy Velvet Hat of Witch', '541' => 'Grand Velvet Hat of Witch', '601' => 'Hunter Hat', '602' => 'Hunter Hat', '603' => 'Hunter Hat', '604' => 'Golden Hunter Hat', '605' => 'Saint Hunter Hat', '606' => 'Legend Hunter Hat', '607' => 'Criker Hat', '608' => 'Criker Hat', '609' => 'Criker Hat', '610' => 'Elven Criker Hat', '611' => 'Saint Criker Hat', '612' => 'Holy Criker Hat', '613' => 'Grand Criker Hat', '614' => 'Ranger Hat', '615' => 'Ranger Hat', '616' => 'Ranger Hat', '617' => 'Elven Ranger Hat', '618' => 'Saint Ranger Hat', '619' => 'Holy Ranger Hat', '620' => 'Grand Ranger Hat', '621' => 'Black Pirate Hat', '622' => 'Black Pirate Hat', '623' => 'Black Pirate Hat', '624' => 'Elven Black Pirate Hat', '625' => 'Saint Black Pirate Hat', '626' => 'Holy Black Pirate Hat', '627' => 'Grand Black Pirate Hat', '628' => "Mariner's Hat", '629' => "Mariner's Hat", '630' => "Mariner's Hat", '631' => "Elven Mariner's Hat", '632' => "Saint Mariner's Hat", '633' => "Holy Mariner's Hat", '634' => "Grand Mariner's Hat", '635' => 'Jaguar Hat', '636' => 'Jaguar Hat', '637' => 'Jaguar Hat', '638' => 'Elven Jaguar Hat', '639' => 'Saint Jaguar Hat', '640' => 'Holy Jaguar Hat', '641' => 'Grand Jaguar Hat', '701' => 'Brown Turban ', '702' => 'Brown Turban ', '703' => 'Brown Turban ', '704' => 'Golden Brown Turban ', '705' => 'Saint Brown Turban ', '706' => 'Legend Brown Turban', '707' => 'Vibe Turban ', '708' => 'Vibe Turban ', '709' => 'Vibe Turban ', '710' => 'Elven Vibe Turban ', '711' => 'Saint Vibe Turban ', '712' => 'Holy Vibe Turban ', '713' => 'Grand Vibe Turban' '714' => 'Tamiya Goggles', '715' => 'Tamiya Goggles', '716' => 'Tamiya Goggles', '717' => 'Elven Tamiya Goggles', '718' => 'Saint Tamiya Goggles', '719' => 'Holy Tamiya Goggles', '720' => 'Grand Tamiya Goggles', '721' => 'Semiya Goggles', '722' => 'Semiya Goggles', '723' => 'Semiya Goggles', '724' => 'Elven Semiya Goggles', '725' => 'Saint Semiya Goggles', '726' => 'Holy Semiya Goggles', '727' => 'Grand Semiya Goggles', '728' => 'Merchant Hat ', '729' => 'Merchant Hat ', '730' => 'Merchant Hat ', '731' => 'Elven Merchant Hat ', '732' => 'Saint Merchant Hat', '733' => 'Holy Merchant Hat', '734' => 'Grand Merchant Hat', '735' => 'Rich Merchant Turban', '736' => 'Rich Merchant Turban', '737' => 'Rich Merchant Turban', '738' => 'Elven Rich Merchant Turban', '739' => 'Saint Rich Merchant Turban', '740' => 'Holy Rich Merchant Turban', '741' => 'Grand Rich Merchant Turban', '744' => 'Mercenary Helm', '745' => 'Warlord Helm', '746' => 'Tyrant Helm', '747' => 'Sparkly Purple Hat of Witch', '748' => 'Shiny Violet Beret', '749' => 'Hat of Wisdom', '750' => 'Nimble Hat', '751' => 'Sagittarius Hat', '752' => 'Commodore Hat', '753' => 'Repairman Goggles', '754' => 'Craftman Goggles', '755' => "Supplier's Turban", '801' => 'Panda Hat', '802' => 'Bug Hat', '803' => 'Lion Hat', '804' => 'Cat Hat', '811' => 'Junon Native Headdress', '812' => 'Red Chicken Hat', '813' => 'Lizard Hat', '814' => 'Rabbit Hairband', '815' => 'Devil Horn', '820' => 'Green Lion Hat', '821' => "Adventurer's Beret", '823' => 'Blue Santa Cap', '824' => 'Navy Blue Magic School Hat', '825' => 'Angel Hat', '826' => 'Kerokero Hat', '827' => 'Headband', '828' => 'New Abyss Plate Helmet', '829' => 'New Serenity Bonnet', '830' => 'New Captain Hat', '831' => 'New Bourgeois Head', '832' => 'White Magic School Hat', ?> Also a file items_add.php, that on each line it has a new item id. it is included. How can I make it so that in the items_add.php file, it will echo the name FROM the itemid in the array. Quote Link to comment Share on other sites More sharing options...
JBS103 Posted February 28, 2007 Share Posted February 28, 2007 <?php require("arraylist.php"); echo $items[1]; //Flu mask ?> Is that what you are looking for? Or is there something I am missing thats making it more complex? Quote Link to comment Share on other sites More sharing options...
chronister Posted February 28, 2007 Share Posted February 28, 2007 You would address the items like this echo $items[1] .'<br>'.$items[32]; would output Flu Mask Dork Glasses Other than that, you will need to be more specific on what you are looking to do. A little more explanation would be good. Quote Link to comment Share on other sites More sharing options...
Imtehbegginer Posted February 28, 2007 Author Share Posted February 28, 2007 That works, but how can I make the script remember that item when it goes to purchase.php? Quote Link to comment Share on other sites More sharing options...
jcbarr Posted February 28, 2007 Share Posted February 28, 2007 You can submit it via a form or you can add it to the session array. All depends on what you are trying to accomplish. Sounds like some sort of shop script, so I would reccomend using a form to then submit to the purchase page. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.