Hello,
I’m very new to PHP, literally just started yesterday so any help is appreciated. I tried to Google as much as I could before this and this is all I could really find.
I’ve created an array with a few strings which I need to get with an int I’ve got saved on my database but I’m not entirely sure what I’ve done wrong. My MySQL is linked up fine and works if I only want to show the integer but I’d like it to show the corresponding text in the array.
Testing here(user LLAMA is what I’m testing): http://gametrade.sx/site/signature.php?player_name=LLAMA
As you can see the other stats are pulled fine, but the "Rank: " part is empty.
[php]
$result=mysql_query($query);
$rankname = array
(
array(“Rank 1”),
array(“Rank 2”),
array(“Rank 3”),
array(“Rank 4”)
);
$Rank=mysql_result($rankname[$result],0,"Rank");
$text_rank = "Rank: $Rank";
imagettftext($im, 10, 0, 185, 85, $text_color, $font, $text_rank);
[/php]
So if the record for Rank = 0 it should output “Rank: Rank 1”, but at the moment it’s only outputting "Rank: "
Thank you.