title: Concatenation with Blade in Laravel
body: <p>I'm trying to access a table column in my ItemController. In this instance, I wish to use the values in my array + a concatenated string to for the column name.</p>
  
  <p>ItemController.php
          ....</p>
  
  <pre><code>public function displayItems() {
     $itemsList = array('Alpha','Bravo','Charlie','Delta');
     //$results = returned mysql row here
     return view('items', ['rs' =&gt; $results, 'items' =&gt; $itemsList]);
  }
  </code></pre>
  
  <p>page.blade.php</p>
  
  <pre><code>@foreach ($items as $item)
    //$item is used elsewhere too, so keep $item
    {{$rs-&gt;$item.'_data'}}
  @endforeach
  </code></pre>
  
  <p>Desired output:</p>
  
  <pre><code>$rs-&gt;Alpha_data;
  $rs-&gt;Delta_data;
  etc
  </code></pre>
  
  <p>How can I dynamically set a variable for $rs-><strong>name</strong> ?</p>