getElementValues() method
<?php function getElementValues( $addslashes ) ?>
This method returns an array of element values. The only parameter it requires is the $addslashes parameter, which can be used to run addslashes() on all the values.
$values = $clonefish->getElementValues( 0 ); print_r( $values );The output:
Array( 'name' => 'James Bond', 'id' => '007', 'language' => 'en' )
Clonefish is transparent by concept: if you use the magic quoting feature of PHP, you can use the following method to replace processing $_POST/$_GET/$_COOKIE/$_REQUEST arrays:
$form = new clonefish( [...] ); $form->addElements( $_POST, get_magic_quotes_gpc() ); print_r( $form->getElementValues( get_magic_quotes_gpc() );This code will return the very same data as you'd get using
print_r( $_POST ); for example - if your PHP is configured to use magic quotes, you'll have them in the end! To read more on handling quotes, see the Features section!
