str_replace solved my pointer problems! such a hack though. Got three buttons getting three different trams.