title: Multiple Conditions in a while loop PHP
body: <p>What is the correct way to use boolean operators to have multiple conditions in a while loop? 
  I have this script here that I feel SHOULD work, however it comes up blank when I run it. </p>
  
  <pre><code>$string = '"""JOHN"" &lt;31255555656&gt;","DAHDI/1-1",3948723,,"",';
  
  for ($i=0; $i&lt;strlen($string); $i++) { 
      if ($string[$i] == chr(34)) {   
          // chr 34 is ascii value for double quote chr 44 is for comma 
          while (($string[$i] != chr(34)) &amp;&amp; ($string[$i+1] != chr(44))) {
              echo $string[$i];
              $i++;
          }
      }
  
  }
  </code></pre>
  
  <p>Ideally what i want is for the script to echo the the given string up until the pointer ($i) reaches a double quote and one ahead of it is a comma. I feel like this is very simple and I am clearly missing something obvious. </p>