Support » Plugin: PHP Code for posts » Return table displaying below footer

  • Hello,

    I’m using this plugin to display a table, but I’m finding it displays below my footer widgets rather than where the page content normally sits.

    Any help would be appreciated. I’m using the zerifPro theme is that helps.

    My page is basically just the short code, and the php after establishing a DB connection is:

    $fields_num = mysql_num_fields($result);

    echo “<h2>Table: {$table}</h2>”;
    echo “<table border=’1′><tr>”;
    // printing table headers
    for($i=0; $i<$fields_num; $i++)
    {
    $field = mysql_fetch_field($result);
    echo “<td>{$field->name}</td>”;
    }
    echo “</tr>\n”;
    // printing table rows
    while($row = mysql_fetch_row($result))
    {
    echo “<tr>”;

    // $row is array… foreach( .. ) puts every element
    // of $row to $cell variable
    foreach($row as $cell) {
    if (substr($cell,0,4)===”http”) {
    echo “<td>$cell</td>”;
    }
    else{
    echo “<td>$cell</td>”;
    }
    }
    echo “</tr>\n”;

    }
    mysql_free_result($result);

    https://wordpress.org/plugins/php-code-for-posts/

  • The topic ‘Return table displaying below footer’ is closed to new replies.