我试过像$meta\\u rwp\\u user\\u score=(number\\u format\\u i18n($meta\\u rwp\\u user\\u score,2)),但这是行不通的。我在哪里使用它?
<?php
$meta_rwp_user_score[\'meta_rwp_user_score\'] = get_post_meta(($anbieter_id),\'rwp_user_score\',true);
foreach ( $meta_rwp_user_score as $key => $value ) :
if ( \'revision\' === $post->post_type ) {
return;
}
if ( get_post_meta( $postid, $key, false ) ) {
// If the custom field already has a value, update it.
update_post_meta( $postid, $key, $value );
} else {
// If the custom field doesn\'t have a value, add it.
add_post_meta( $postid, $key, $value);
}
if ( ! $value ) {
// Delete the meta key if there\'s no value
delete_post_meta( $postid, $key );
}
endforeach;
?>