You didn't wrap your javascript arguments in quotes. You need to wrap each variable in single quotes, since you used double quotes for "href" attribute. Another thing is that you didn't close up "a" HTML tag.
echo '<a href="javascript:tempBuy(\''.$res_get_price[0][0].'\',\''.$res_get_price[0][1].'\',\''.$res_get_price[0][2].'\',\''.$dt_str.'\')">'.$res_get_price[0][0].'</a>';