Referencing class properties dynamically
<pre><code>for ($e = 1; $e &lt;= 10; $e++)
{
    $edd = Setting::where('id', '=', $e)-&gt;update([
      'nama' =&gt; $request-&gt;nama1,
      'isi'  =&gt; $request-&gt;isi1,
    ]);
}
</code></pre>

<p>How can I dynamically reference class properties within the <code>for</code> loop? I want to reference <code>nama1</code> and <code>isi1</code> up to <code>nama10</code> and <code>isi10</code> on the <code>$request</code> object.  </p>