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? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -