2000000 の代わりに 1 200,12 500 または 2 000 000 のように数字をスペースで区切りたい...
function show_price($id) {
global $currency_a;
if(get_option("defaultcurrency")) {
$curr = $currency_a[get_option("defaultcurrency")][2];
} else {
$curr = $currency_a[get_post_meta($id, "currency", true)][2];
}
$price = get_post_meta($id, "price", true);
$currpos = get_option("currpos");
if($currpos == "1" || !$currpos) {
return $price."".$curr;
} elseif ($currpos == "2") {
return $curr."".$price;
} elseif ($currpos == "3") {
return $price;
}
}