Allow PHP in Posts and Pages
will not work with for loop (2 posts)

  1. santiazpi
    Posted 4 years ago #

    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 ;. :(


  2. roncsak
    Posted 3 years ago #

    I have the same problem!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Allow PHP in Posts and Pages
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic