PHP Code: 
<?
$value 
'[img]http://google.com[/img]';
$unwanted = array("[img]""[/img]");
$wanted  = array("[img="" width=200]");
$value=str_replace($unwanted$wanted$value);
echo 
$value;
?>