Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function randomizer( $page = '', $pattern = null, $inventory = array() )
- {
- $nen = nen_ini();
- if( is_null ( $pattern ) )
- {
- return $inventory;
- }
- echo '<div style="font-size:12px;">'. str_replace( '\r\n', '<br>', htmlentities( $page ) ). '</div>';
- if( preg_match_all( $pattern, $page, $matches ) )
- {
- echo '<div style="font-size:24px;">'. $pattern. '</div>';
- var_dump( $matches );
- foreach( $matches as $groups )
- {
- $option_index = 0;
- while( isset( $groups[ 'option'. ( $option_index + 1 ) ] ) )
- {
- $option_index++;
- $inventory[ count( $inventory ) ] = $groups[ 'option'. ( $option_index ) ];
- }
- }
- }
- return $inventory;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement