array + str_replace issues :(
Posted: Sat May 08, 2010 5:17 pm
ok... here is the deal lol.
the code i have is as follows...
now when the replace hits 10,11 etc.... it doesnt replace it with the right value,
instead it replaces it with helmet then helmetchest helmetlegs etc..
how the flaming hell do i stop this
the code i have is as follows...
Code: Select all
$orig = array('1','2','3','4','5','6','7','8','9','10','11','12');
$rep = array('Helmet','Chest','Legs','Boots','Belt','Weapon','Shield','Necklace','Bracelet','Glove','Ring','Relic');
$equipmentType = str_replace($orig,$rep,$_GET['equipment']);now when the replace hits 10,11 etc.... it doesnt replace it with the right value,
instead it replaces it with helmet then helmetchest helmetlegs etc..
how the flaming hell do i stop this