title: How can i put $variable into array
body: <p>Hello this is the code i want to put an variable into array </p>
  
  <pre><code>    class NewTest extends BaseExample {
    public function render() {
      $startDate = $this-&gt;getNow();
      $endDate = $this-&gt;getNow();
      $optParams = array(
        'metric' =&gt; array('EARNINGS'),
        'useTimezoneReporting' =&gt; true,
        'filter' =&gt; 'DOMAIN_NAME==' .$sub. ',      
      );
  </code></pre>
  
  <p>I've tried <code>' .$sub.'</code> and $sub but it doesn't work</p>