WordPress.org

Ready to get started?Download WordPress

Forums

Allow PHP in Posts and Pages
echo -ing HTML tags results in ... nothing (4 posts)

  1. nilfisk8
    Member
    Posted 1 year ago #

    echo "<div id=\"silverlightControlHost\">";
    doesn't print anything. echo "hello" works fine.
    WordPress version 3.5.1 localized to Finnish.

    Help me with my blasphemous attempt to embed a Silverlight -component to a page.

    Thanks.

    http://wordpress.org/extend/plugins/allow-php-in-posts-and-pages/

  2. egerlach
    Member
    Posted 1 year ago #

    Yes, thats right, same with me here WP 3.5.1.

    [php]
    print xxxxxxxxxxxxxxxxxxxx;
    print "[div class='top-box-left']";
    [/php]

    prints xxxxxxxxxxxx but no div class .... and a lot of errors instead. Same with print "[div class=\"top-box-left\"]";

    This php plugin seems to be broken :(

  3. Muhammad Muhaimin
    Member
    Posted 3 months ago #


  4. Muhammad Muhaimin
    Member
    Posted 3 months ago #

    I got a solution!
    it makes me crazy, but yes, it works.

    we have to decode the unicode character...

    < is \u003C
    > is \u003E

    so, nilfisk8, your code will be...

    $left = json_decode('"\u003C"');
    $right = json_decode('"\u003E"');
    
    echo $left."div id='silverlightControlHost'".$right;

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic