 <p>You have to print the <code>$value</code> bacause <code>$value</code> have original array value not index. And you are getting array in <code>$stdlist</code> from exploding this post variable <code>$_POST['stdlist']</code>.</p> <pre><code>foreach($stdlist as $value) { echo "&lt;br&gt;"; echo $value; } </code></pre> <p>Now you will get your required result.</p>