wpp_arraychecker

The WooCommerce PDF & Print wpp arraychecker function.

Description

wpp_arraychecker( $var, $arr ); 

Parameters (2)

0. $var
The var.
1. $arr
The arr.

Usage

  1. if ( !function_exists( 'wpp_arraychecker' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-pdf-print/functions.php'; 
  3.  
  4. // The var. 
  5. $var = null; 
  6.  
  7. // The arr. 
  8. $arr = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = wpp_arraychecker($var, $arr); 
  12.  

Defined (1)

The function is defined in the following location(s).

/functions.php  
  1. function wpp_arraychecker($var, $arr) 
  2. $rv=false; 
  3. for($r=0;$r<count($arr);$r++) 
  4. if($arr[$r]==$var) {$rv=true;break;} 
  5. return $rv;