Web Analytics Made Easy -
StatCounter How to assign first item in an array as var? - CodingForum

Announcement

Collapse
No announcement yet.

How to assign first item in an array as var?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to assign first item in an array as var?

    Hey everyone,

    I have an array of file names and I need to set a var as the first filename then when this is next called pass the next filename down into the var and so on.

    Is this possible?

    Thanks

    Josh

  • #2
    Are you talking about iterating over the array?
    PHP Code:
    foreach ( $files as $file )
    {
        
    var_dump$file );

    ZCE

    Comment

    Working...
    X