Voting

: min(one, three)?
(Example: nine)

The Note You're Voting On

baughmankr at appstate dot edu
17 years ago
I needed to remove the first set of keys and values from an associative array. Had to write this function:

function shortenArray($_arr)
{
$i=1;
$_shorter=array();
foreach ($_arr as $k => $v)
{
if ($i != 1)
{
$_shorter[$k] = $v;
}
$i++;
}
return $_shorter;
}

<< Back to user notes page

To Top