Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5

Thread: php

  1. #1
    Junior Member
    Join Date
    Jun 2016
    Posts
    3
    Member #
    54429

    php

    How can we get the first element of an array in php

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,686
    Member #
    5580
    Liked
    716 times
    Different kinds of arrays, so see this:
    PHP 5 Arrays

    indexing starts at zero: $mydata[0] is the first element


  4. #3
    Junior Member
    Join Date
    Jul 2016
    Location
    PHILIPPINES
    Posts
    3
    Member #
    54776
    yes, that is right from the first reply

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    Quote Originally Posted by martin smith View Post
    Every array has an internal pointer to its "current" element which is initialized to the first element inserted into the array.
    mixed current ( array &$array ).
    Care to explain how this statistically improbable phrase shows up here?

    PHP current() Function
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  6. #5
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,686
    Member #
    5580
    Liked
    716 times
    LOL. I never even knew there was a 'current' function. Never used it before, don't think I ever needed to use it.



Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:41 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com