You appear to be a bot. Output may be restricted
Description
Return the value from a list of possible parameters
Usage
$string = bw_array_get_from( $atts, $from, $default );
Parameters
- $atts
- ( array ) required – an array of key value pairs
- $from
- ( mixed ) required – a list e.g. ( "api,func" ) or array of key names
- $default
- ( string ) required – the default value if not set
Returns
string the first value found or the defaultSource
File name: oik/includes/bobbcomp.phpLines:
1 to 15 of 15
function bw_array_get_from( $atts, $from, $default ) { $from =bw_as_array( $from ); $fc =count( $from ); $f =0; $result=null; while ( ( $f < $fc ) && $result === null ) { $result=bw_array_get( $atts, $from[ $f ], null ); $f ++; } if ( ! $result ) { $result=$default; } return ( $result ); }View on GitHub View on Trac