Support » Fixing WordPress » get_post_meta ads an extra “array”?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Does this change things:

    $a = get_post_meta(1,'my_key',TRUE);

    The TRUE says to return a single value (which for you is an array), not an array of all values for that key (an array of arrays). See the Codex here.

    Aha, of course. Thank you very much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘get_post_meta ads an extra “array”?’ is closed to new replies.