Array elements

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
DavidAKey
Forum Newbie
Posts: 3
Joined: Thu Jan 08, 2004 4:24 am

Array elements

Post by DavidAKey »

How can a specific array element be accessed.

I have tried
$newvar = $arrayname[3];
but it doesn't seem to work.

Thanks in advance.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Arrays are accessed exactly in this way.
Post Reply