WordPress.org

Support

Support » Plugins and Hacks » Allow PHP in Posts and Pages » [Plugin: Allow PHP in Posts and Pages] will not work with for loop

[Plugin: Allow PHP in Posts and Pages] will not work with for loop

  • It took me very long to figure it out (by installing another plugin, shortcode exec php), but for some reason it is not able do deal with for for loops…

    Start of my code up to were it broke:

    $answers = array (
    	"A" => "XX",
    	"B" => "YY",
    	"C" => "ZZ",
    	"D" => "WW",
    	"E" => "UU"
    	);
    $questions = $_GET["q"];
    //Only run if we get the q(uestions) parameter
    if ( $questions > 0 ) {
    	for ($i	= 1; $i <= $questions; $i++) {
    
    		$responses = $_GET[$i][0];
    		}
    	//Return array

    The code would throw an eval error right after for ($i = 1; saying it was missing a ;. 🙁

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

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Allow PHP in Posts and Pages] will not work with for loop’ is closed to new replies.
Skip to toolbar