= 150){ $_SESSION["guild"]= array("miners" => 1); $_SESSION["mine"]["gold"] -= 150; echo "Guild has been successfully created"; } else{ echo "Not enough money"; } } function hireMiner(){ if(!isset($_SESSION["guild"])){ echo "
you need to create a guild first"; } if($_SESSION["mine"]["gold"] >= 40){ $_SESSION["guild"]["miners"]++; $_SESSION["mine"]["gold"] -= 40; $_SESSION["mine"]["miners"] = $_SESSION["guild"]["miners"]; $mine = $_SESSION["mine"]; $guild = $_SESSION["guild"]; echo $mine["gold"]; echo $mine["miners"]; } } ?>