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

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

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -