If anyone knows of the Nintendo Wii Virtual Console; that’s good, I am making a ‘simple’ calculator that allows you (regardless of region) to find how many Wii points you would have after you downloaded some retro games onto the Wii. All I need is help with a foreach loop. Here is the PHP file (that does the interpreting of the form):
[php]<?PHP
// ======================================================================
// NORTH AMERICA
// ======================================================================
$_PRICES[‘NES’] = 500;
$_PRICES[‘SNES’] = 800;
$_PRICES[‘N64’] = 1000;
$_PRICES[‘GEN’] = 800;
$_PRICES[‘TURBO’] = 600;
//---------------------------------------------------------------------------
// SOUTH AMERICA
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// EUROPE
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// ASIA
//---------------------------------------------------------------------------
/*
$_PRICES[‘FAM’] = 500;
$_PRICES[‘SFAM’] = 800;
$_PRICES[‘N64’] = 1000;
$_PRICES[‘MASTER’] = 800;
$_PRICES[‘PC’] = 600;
*/
//---------------------------------------------------------------------------
// OTHER
//---------------------------------------------------------------------------
$total = 0;
foreach ($_PRICES as $current_game)
{
}
?>[/php]
Early December I had help with this same thing from my brother; it went onto a (currently down) ‘server’ as such I can’t get the code but from the 1st calclulator I remember the loop having:
$_POST in it (I think $_POST[‘before’]), $total, +=, $current_game**********. And another variable that I can’t remember the name or what it was set as.
Also as I said before the PHP file interpreted a form which is:
[code]
Virtual Console Calculator Welcome one, welcome all! To this Virtual Console Calculator. This script is to help you decide on what Virtual Console games you'd like to download onto your Nintendo Wii. Simply check the boxes of the game(s) you'd like to download & (how many wii points you'd have after the last download is done), and input (at the bottom) amount of Wii points you have, and submit.Nintendo Entertainment System | Donkey Kong | Mario Bros | Pinball | Soccer | Solomon's Key | Legend of Zelda | Wario's Woods | Donkey Kong Jr | Ice Hockey | Tennis | Super Mario Bros | Baseball | Urban Champion |
Super Nintendo Entertainment System | F-Zero | SimCity | Street Fighter II: The World Warrior | Super Castlevania IV | |||||||||
Nintendo 64 | Mario 64 | ||||||||||||
Sega Genesis | Altered Beast | Sonic The Hedgehog | Ecco the Dolphin | Golden Axe | Columns | Ristar | Dr. Robotnik's Mean Bean Machine | Gunstar Heroes | Space Harrier II | ToeJam & Earl | |||
Turbo Grafix 16 | Bomberman '93 | Bonk's Adventure | Super Star Soldier | Victory Run | Alien Crush | Military Madness | R-Type |
Think someone could help me? To confusing/long? Also: the loop does NOT use functions (like count(), rand(), mt_rand(), no functions); also it does not use things OTHER than those. That’s what the oringinal used, i’m trying to replicate it exactly and the oringinal had those (and some other things whch I can’t remember) and only those.