"Arrays" Please respond to the following:

Computer Science
Tutor: None Selected Time limit: 1 Day

Describe the purpose of the internal array pointer; provide an example of when you might need to use an internal array pointer with associative arrays.

Feb 15th, 2015

rewinds array's internal pointer to the first element and returns the value of the first array element.

<?php

$array = array('step one', 'step two', 'step three', 'step four');// by default, the pointer is on the first elementecho current($array) . "<br />\n"; // "step one"

// skip two stepsnext($array);next($array);
echo current($array) . "<br />\n"; // "step three"

// reset pointer, start again on step onereset($array);
echo current($array) . "<br />\n"; // "step one"?>

Feb 15th, 2015

Did you know? You can earn $20 for every friend you invite to Studypool!
Click here to
Refer a Friend
...
Feb 15th, 2015
...
Feb 15th, 2015
Dec 4th, 2016
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer