I have this array:
$array = array('name'=>'test','server'=>'zangarmarsh','fields'=>'items,stats');
$type = 'character';
$r = $client->fetch($type,$array);
echo '<pre>';
print_r($r);
echo '</pre>';
The output:
[result] => Array
(
[thumbnail] => hellscream/74/113337162-avatar.jpg
}
Now I echo out the picture:
echo "<img src='http://render-api-us.worldofwarcraft.com/static-render/us/" . $r['result']['thumbnail'] . "' alt='error'>";
Now i want to change the word "avatar" (from the arrays´ output) with the word "profilemain". I know that you can do it with echo str_replace, but i can´t get it work.