Posted on Wednesday 23rd July 2008 at 10:40 PM | |
IcedEarth Newbie |
I have an table called Guilds, but thing is when someone creates guild, it adds to GuildLeader like this IcedEarth:blahblah:blahblah that blahblah:blahblah is needed but how can i fetch the name for GuildLeader only i mean fetch IcedEarth not whole row ? Any help is welcome. |
Posted on Wednesday 23rd July 2008 at 11:08 PM | |
ShadowMage Senior Member |
use the explode function ;) Ex: Code $MyText = "Leader:sub:sub:sub:Me"; $exArray = explode(":", $MyText); //its stored in an array //$exArray[1] is Leader print_r($exArray); |
Posted on Wednesday 23rd July 2008 at 11:20 PM | |
IcedEarth Newbie |
hm... this gives me a some rows that i don't even have in database :S |
Posted on Wednesday 23rd July 2008 at 11:36 PM | |
ShadowMage Senior Member |
print_r is used to print arrays :S |
Posted on Thursday 24th July 2008 at 12:25 AM | |
IcedEarth Newbie |
Thank's MOD-Shadow, you the best i have seen ! +1 reputatsion from me. |