title: php optional assosciative array value
body: <p>Is there a way to skip array value or any other way around.<br>
  I know , we can either put it to null or ' '. But I have many array keys &amp; very few keys with a value.<br>
  In the below array , only Iconpicker is needed a value , setting all other keys to null or an empty array is an arduous task.</p>
  
  <p>Instead of setting all the keys to null</p>
  
  <pre><code>$array =  array(
          'active'    =&gt; null,
          'required'  =&gt; null,
          'show_label'=&gt; null,
          'label_text'=&gt; null,
          'default'   =&gt; null,
          'iconpicker'=&gt; array(
              'args' =&gt; '11'
          ),
          'placeholder'=&gt; null,
          'min_char'  =&gt; null,
          'max_char'  =&gt; null,
      ),
  </code></pre>
  
  <p>I want to keep it simple</p>
  
  <pre><code>$array = array(
      'active',
      'required',
      'show_label',
      'label_text',
      'default',
      'iconpicker' =&gt; array(
          'other' =&gt; 'test',
      ),
      'placeholder',
      'min_char',
      'max_char'
  ),
  </code></pre>
  
  <p>This is just an example , there are many more keys. I process this array as an argument to a function , so it should be dynamic.</p>
  
  <pre><code>    foreach ( $array as $key =&gt; $value ) {
          generate_settings( $key, $value )
      }
  </code></pre>