Related Links : Search Engine Optimization | | Search Engine Marketing | Online Marketing | Freelance Programmer| SEO Thailand | SEO Expert | SEO services | PHP Programmer Thailand | SEO Tutorial | What is SEO |

  Home Our SEO Services SEO Expert Consultant Php Programmer Scripts| Email : sachin {at} jainsachin {dot} com

PHP | Return current array entry | Manual | Tutorial | Help

SEO Services



Website Programming in PHP / MYSQL



Friends


    Return current array entry

    ArrayIterator::current

    (PHP 5)

    ArrayIterator::current — Return current array entry

    Description

    mixed ArrayIterator::current ( void )

    Get the current array entry.

    Parameters

    This function has no parameters.

    Return Values

    The current array entry.

    Examples

    Example #1 ArrayIterator::current() example

    <?php
    $array 
    = array('1' => 'one',
                   
    '2' => 'two',
                   
    '3' => 'three');

    $arrayobject = new ArrayObject($array);

    for(
    $iterator $arrayobject->getIterator();
        
    $iterator->valid();
        
    $iterator->next()) {

        echo 
    $iterator->key() . ' => ' $iterator->current() . "\n";
    }
    ?>

    The above example will output:

    1 => one
    2 => two
    3 => three
    


    SEO Tutorial / Articles





    Php / Mysql Tutorial



    Articles



      Portfolio


      SEO by Jainsachin