• Resolved neetij

    (@neetij)


    This may be more PHP than WordPress.
    I know I can get the comment author’s email address using the comment_author_email(); command. I want to assign the resultant email address to a variable ($email). When I use the statement:
    $email = comment_author_email();
    the author’s email address is printed to screen as text.
    How do I set the variable with the resulting value of the command?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Kafkaesqui

    (@kafkaesqui)

    If you’re using 1.5, try:

    $email = get_comment_author_email();

    If one looks at the comment_author_email() function in the source, they’d see it’s just echoing the above.

    Thread Starter neetij

    (@neetij)

    Kafkaesqui, that did the trick. Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Help – getting comment author info’ is closed to new replies.