troja
SD 2014
- Joined
- Jan 1, 2009
- Messages
- 2,116
- Reaction score
- 54
Hello, I've work'd abit with a custom AAC, just 4 fun.
Tho, I've one problem. My PHP code is like this
This works, but. When it display character's vocation, it prints a number. So, 1 = ED, 2 = MS etc. But, I want it to print ED, MS etc instead.
I've tried print_r but I don't really like the result;
Array[0] => 'Elder druid', or however it was.
Thanks,
Tho, I've one problem. My PHP code is like this
PHP:
while($row = mysql_fetch_array($data))
{
$search = array('Elder Druid', 'Master Sorcerer', 'Royal Paladin', 'Elite Knight', 'Druid', 'Sorcerer', 'Paladin', 'Knight');
$replace = array('ED', 'MS', 'RP', 'EK', 'D', 'S', 'P', 'K');
echo $row['name'];
echo $row['level'];
$subject = $row['vocation'];
echo str_replace($search, $replace, $subject);
}
I've tried print_r but I don't really like the result;
Array[0] => 'Elder druid', or however it was.
Thanks,
Last edited: