How I can show only three elements of my associative array using for? <p>This is my Associative Array:</p> <pre><code>$vetor = array( "Name"=&gt; "myName", "Tel"=&gt; "555-2020", "Age"=&gt; "60", "Gender"=&gt; "Male" ); </code></pre> <p>How I can show only three elements using the loop <code>for</code>?</p> <p>I tried this:</p> <pre><code>for($i=0; $i&lt;=2; $i++){ echo $vetor[$i]."&lt;br&gt;"; } </code></pre> <p>But without success. How I can do this?</p>