Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Pass array into function Re: Pass array into function

#57890
TT_Mark
Member

The you want to pass an array


callSomeFunction( array('1', '2', '3') ) ;

function callSomeFunction( $parameters=array() )
{
// Check array is not empty
if ( !is_empty( $parameters ) )
{
// Loop through array values
foreach ( $parameters AS $variable )
{
// Do Something
}
}
}

?>