[RESOLVED] output mysql_fetch_array into seperate strings
Hi i was wandering if anyone could help me out with a little problem im having, I am currently trying to make a php image file that a user can call like so
And it will display there charaters information stored in the database.
Anyway i have the basic thing working but need some help i will explain or try to explain how it all works.
The database has 2 different tables 1 for user information and 1 for character info the user info contains the uniqe 20 char ID and i use this to query the actual userID for the user then use that userID to query the character table each character stored in the character is stored with the userID and then the info.
Anyway as you can see in this example i want to somehow enable the script to display seperate charaters on a new line after "Hour(s)" -
Currently i am using this function to output all the results to a single string
Could anyone point me in the right direction i have a feeling i will need to split the outputstring into seperate strings and add them to the image in another loop function depending on how many charaters a user has.
while($GetCharsrow = mysql_fetch_array($GetChars))
$string.="Class: ".$GetCharsrow['class']." Level: ".$GetCharsrow['level']." Current XP: ".$GetCharsrow['currentxp']."% Time to Level: ".$GetCharsrow['timetolevel']." Hour(s)";
$outputstring = outputsigstring();
ImageString($image, 3, 5, 3, $outputstring, $black);
If have not explained myself well enough please feel free to ask what i mean.
Ok i found a function to split strings after \n its not hard actually i will mark this as resolved. Sorry for taking up space actually.
Make sure it NEVER happens again, darnit.
Sorry for taking up space actually.
I'm kidding, of course, and glad you figured it out. Good that you posted it, ya never know someone else might run into the same trouble. Cheers!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread