WordPress.org

Ready to get started?Download WordPress

Forums

Allow PHP in Posts and Pages
double single quotes causing errors (1 post)

  1. iisisrael
    Member
    Posted 1 year ago #

    Double single quotes in php code become single single quotes and causes the eval of $content in function shortcode to break.

    [php]
    $string = "foops";
    $string = preg_replace( "/p.*/", '', $string);
    echo $string;
    [/php]

    This throws an unexpected $end error. Changing the single quotes to double quotes fixes the error, and "foo" will be echoed.

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.