[eluser]skunkbad[/eluser]
Since you are actually looking for the $_POST array keys, your only real option here is to use the native $_POST array. CodeIgniter does not allow for array functions to work directly on $this->input->post().
Code:
<?php
if(isset($_POST))
{
echo '<h1>The Post Array</h1>
<ul>';
foreach ($_POST as $key => $value)
{
echo '<li>' . $key . ' has the value of ' . $value . '</li>';
}
echo '</ul>';
}
but, if you would like to extend the Input class, you could use something like this function in a My_Input.php
Code:
function _fetch_from_array(&$array, $index = '', $xss_clean = FALSE)
{
if ( $index == '' )
{
$new_array = FALSE;
foreach ($array as $key => $value )
{
$new_array[$key] = $value;
}
if ($xss_clean === TRUE)
{
return $this->xss_clean($new_array);
}
else
{
return $new_array;
}
}
if ( ! isset($array[$index]))
{
return FALSE;
}
if ($xss_clean === TRUE)
{
return $this->xss_clean($array[$index]);
}
return $array[$index];
}