Trying to Find a Loop to use for a specific MySQL query
Saving lines of code in search of elegance is not always (in fact hardly ever in my experience) a worthwhile exercise if it comes at the expense of clarity and maintainability. Your current code is better than any solution that iterates over table columns because it is clear and easy to change. For example, combining the data of two columns into one or changing column order are both trivial.

You might consider moving this display logic to a template. Here is an example of a twig template:

{% if results %}
&lt;h1&gt;HERE ARE SOME RESULTS&lt;/h1&gt;
&lt;table&gt;
    {% for row in results %}
    &lt;tr&gt;
        &lt;td&gt;{{ row.subject }}&lt;/td&gt;
        &lt;td&gt;{{ row.description }}&lt;/td&gt;
        {% if row.user == user %}
        &lt;td&gt;You can delete this&lt;/td&gt;
        {% else %}
        &lt;td&gt;Code didn't work&lt;/td&gt;
        {% endif %}
    &lt;/tr&gt;
    {% endfor %}
&lt;/table&gt;
{% else %}
&lt;p&gt;No results&lt;/p&gt;
{% endif %}


The PHP becomes very simple:

$bindings = array(
    'results' =&gt; $mysqli-&gt;query('SELECT...'),
    'user' =&gt; $_SESSION['firstname'] . ' ' . $_SESSION['lastname']
);
$twig-&gt;render('template.html', $bindings);