( x )'; } if ( !$modreturn[2] ) { $modreturn[2] .= '
'; } $modreturn[2] .= '

' . $pageownername . '\'s Example

'; if ( mysql_num_rows ( $exampleresults ) > 0 ) { $modreturn[1][0] = 'vistoggle ( \'examplelist\' );'; // Here, we're sending an element ID (an UL in this case) that we want to be made hidden on page load. When the user clicks the "view example" link specified below, the list will then become visible. $modreturn[2] .= ' '; } else { $modreturn[2] .= '

There are no examples

'; } $modreturn[2] .= '
'; } // Always return all output - do not do echos within the functions. $modreturn is always sent as an array with 3 values: // $modreturn[0] // Holds the Javascript output. This is printed in the header. // $modreturn[1] // Holds the Javascript that should be executed onload. // $modreturn[2] // Holds the XHTML output. return $modreturn; } ?>