How to get array value from looping in php? -


i think simple problem. can't finish it. please me simple problem. want values array use looping. , code

<?for ($i = 1 ; $i <=5 ; $i++){ $foo = array(1,2,3,4,5); echo $foo[i]; } ?> 

it doesn't work :(

use this

$foo = array(1,2,3,4,5); echo $foo[$i]; 

you missed $ before should $i mark variable.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

How can I fetch data from a web server in an android application? -

jquery - How can I dynamically add a browser tab? -