title: Get key with condition in Array in PHP
body: <pre><code> if ($totalModuletest&gt;0){
       if (in_array(1, $modValArr, true)){
           echo "1.13 found with strict check\n";
        }
   }
   else{
        $aVal = 0;
   }
  </code></pre>
  
  <p>By using print_r($modValArr);</p>
  
  <pre><code>Array ( [0] =&gt; 0 [1] =&gt; 0 [2] =&gt; 0 [3] =&gt; 0 [4] =&gt; 1[5])
  </code></pre>
  
  <p>I want to know any value exist greater than zero in this array. If it exists I need its key. The result I need is 4.</p>
  
  <p>How is this possible in PHP?</p>