• westdh

    (@westdh)


    I need to know how to enter a Newline Character in the following string.

    <h1><?php esc_html_e( ‘Two Event Sponsorships per Month are Available!nl2br()The two Sponsorships [1 per each Sponsor] are registered and payed for. The month selected will be removed.’ , ‘StyleShop’ ); ?></h1>

    I have tried this nl2br(), but it doesn’t work.

    <h1><?php esc_html_e( ‘Two Event Sponsorships per Month are Available!nl2br()The two Sponsorships [1 per each Sponsor] are registered and payed for. The month selected will be removed.’ , ‘StyleShop’ ); ?></h1>

Viewing 2 replies - 1 through 2 (of 2 total)
  • hello,
    what about this:

    <h1><?php _e( ‘Two Event Sponsorships per Month are Available! < br / > The two Sponsorships [1 per each Sponsor] are registered and payed for. The month selected will be removed.’ , ‘StyleShop’ ); ?></h1>

    but remove spaces from br tag < />

    or you can do this:
    <h1><?php esc_html_e( ‘Two Event Sponsorships per Month are Available!’ , ‘StyleShop’ ); ?></h1>

    <h1><?php esc_html_e( ‘The two Sponsorships [1 per each Sponsor] are registered and payed for. The month selected will be removed.’ , ‘StyleShop’ ); ?></h1>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to add a New Line in php esc_html_e(' ? ')’ is closed to new replies.