When a use it like this:
add_post_meta($post_ID, 'Name', "Bob", true );
works fine, but when a store an string value inside a variable, for example:
$name = "Bob";
add_post_meta($post_ID, 'Name', $name, true ); // <---- This doesn't work.
Some help please. Thanks.
2
Answers
Try the below code.