PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hi. I've been having serious problems with a script I'm trying to write... Hoping you can help
If you've ever played Diablo II, you're gonna know what I'm talking about. In the game you can collect runes that you can put into socketed items, combining them, creating a runeword that gives the item some cool attributes. So. I'm programming a website where I can add all the runes I've collected in the game and put them into a database. That part I've got covered. Next I want to add specific runewords in another database and write a script that dynamicaly checks if I've collected enough runes to form a runeword and if so notify me with a simple:
and so on... I get this data using mysql_fetch_array / mysql_fetch_assoc... And this is how far I've come, because I don't know how I should store the runewords in a database so that I later on can compare them to single runes. Example:
One runeword is made by putting together the runes: "Tal" and "Eth". So, if I have those two runes in the other database, I want to echo out something that would notify me of the available runeword.
Is this making any sense? I hope, cause I don't have any useful code to give you.
$end = count($array1);
for($i=1;$i<$end;$i++){
if($array1[$i] == $array2[$i]){
// code here
}else{
// code here
}
}
(Of course, this does assume that $array1 and $array2 are both the same legth)
Otherwise, to be honest I have no idea what you're trying to do... Sorry!