title: PHP not processing second condition in OR
body: <p>I searched a lot and couldn't find any solution besides writting bigger code.
  What i need is,  only to be outputted if one of the two $btn_ strings is set.</p>
  
  <p>In current state if <code>$btn_orange = get_field('btn_orange')</code> equeals true, 
  <code>( $btn_black = get_field('btn_black')</code> is not being processed while <code>get_field('btn_black')</code> returns a good value.</p>
  
  <p>In short: <code>$btn_black</code> is not set if <code>$btn_orange</code> is.</p>
  
  <p>This is my current code:</p>
  
  <pre><code>&lt;?php if( ( $btn_orange = get_field('btn_orange') ) || ( $btn_black = get_field('btn_black') ) ): ?&gt;
  
         &lt;div class="buttons"&gt;
  
          &lt;?php if($btn_orange &amp;&amp; ( $btn_orange_url = get_field('btn_orange_url') ) ): ?&gt;
  
              &lt;a class="btn btn-lg btn-primary" href="&lt;?php echo $btn_orange_url; ?&gt;"&gt;&lt;?php echo $btn_orange; ?&gt;&lt;/a&gt;
  
          &lt;?php elseif($btn_orange): ?&gt;
  
              &lt;span class="btn btn-lg btn-primary"&gt;&lt;?php echo $btn_orange; ?&gt;&lt;/span&gt;
  
          &lt;?php endif;?&gt;
  
          &lt;?php if($btn_black &amp;&amp; ( $btn_black_url = get_field('btn_black_url') ) ): ?&gt;
  
              &lt;a class="btn btn-lg btn-black" href="&lt;?php echo $btn_black_url; ?&gt;"&gt;&lt;?php echo $btn_black; ?&gt;&lt;/a&gt;
  
          &lt;?php elseif($btn_black): ?&gt;
  
              &lt;span class="btn btn-lg btn-black"&gt;&lt;?php echo $btn_black; ?&gt;&lt;/span&gt;
  
          &lt;?php endif;?&gt;
  
      &lt;/div&gt;
  
  &lt;?php endif; ?&gt;
  </code></pre>
  
  <p>Now i can  separate <code>btn_orange</code> and <code>$btn_black</code> in seperate if blocks.
  But i need <code>&lt;div class="buttons"&gt;</code> to be outputted if one of the two or both are set with the values of <code>get_field()</code>.</p>
  
  <p>can i accomplish this within the first if statement?</p>
  
  <p><strong>edit:</strong> Problem solved. I should not put something like <code>$x = func($parameter)</code> in a <code>IF</code> statement but first populate the string first as dougtesting.net pointed out.</p>