
<?php function escape( $string ){ if ( function_exists( 'mysql_real_escape_string' ) ) { } elseif( function_exists( 'mysql_escape_string' ) ) { } } function clear( $mixData ){ foreach( $mixData as $key => $value ){ $mixData[$key] = clear( $value ); } } else { } return $mixData; } /* PRZYKŁAD ZASTOSOWANIA escape() */ /*PRZYKŁAD ZASTOSOWANIA clear() ... oczywiście wykonanie zapytania itd ... jest to fragment mojej funkcji ale chodzi poprostu o zobrazowanie zasaday działania, */ if ( $strField !== '' ){ //możemy czyścić string $arrRows[] = $this->clear( $arrRow[$strField] ); } else { //albo tablice $arrRows[] = $this->clear( $arrRow ); } } ?>