WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Pipe character error

[Resolved] Pipe character error

  • I have an error with some code being executed. When I use a pipe character | in my code as a delimiter, the code is displayed on the screen as text and not executed.

    For example:

    $variable = "1600 Pennsylvania Avenue, Washington, D.C. | 220 Main Building, Notre Dame, IN 46556";

    I tried escaping the character ‘\|’, but that did not work. At this point, I am unsure if I can get around the problem. Do you have any suggestions?

    Thank you.

    https://wordpress.org/plugins/insert-php/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author WillBontrager
    Member

    @willbontrager

    Esilvas, substituting “|” for “|” should work.

    $variable = "1600 Pennsylvania Avenue, Washington, D.C. | 220 Main Building, Notre Dame, IN 46556";

    More info about using the pipe character at:

    http://www.willmaster.com/software/WPplugins/insert-php-wordpress-plugin-instructions.php#nonworkingelements

    Will

    Plugin Author WillBontrager
    Member

    @willbontrager

    Error in my previous response. The HTML entity was converted into the character.

    The first line of my previous response should read:

    Esilvas, substituting “& #124;” (no space between “&” and “#124;”) for “|” should work.

    (It seems impossible to publish an HTML entity code without the entity being converted into the character in this support area, which is why the space after the & to get the code printed.)

    Will

    Plugin Author WillBontrager
    Member

    @willbontrager

    Because there has been no response, I’m assuming the original poster resolved the issue.

    Sorry, I have been working on other things over the weekend. Yes, this issue has been resolved. I appreciate the help. Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Pipe character error’ is closed to new replies.