You appear to be a bot. Output may be restricted
Description
Format an array of parms for jQuery
If it's not an array we treat it as an already formatted string OR a single parameter and value
Usage
bw_jkv( $parms, $value, $json_options );
Parameters
- $parms
- ( mixed ) required –
- $value
- ( mixed ) optional –
- $json_options
- ( mixed ) optional –
Returns
void
Source
File name: oik-bwtrace/libs/bobbfunc.php
Lines:
1 to 21 of 21
function bw_jkv( $parms, $value=null, $json_options=null ) { if ( is_array( $parms ) ) { bw_jtorf( $parms ); if ( $json_options == null && defined( 'JSON_NUMERIC_CHECK' )) { $json_options = (JSON_NUMERIC_CHECK | JSON_FORCE_OBJECT); } else { // We can't use JSON_NUMERIC_CHECK if it's not defined } $jqoption = bw_json_encode( $parms, $json_options ); } else { $jqoption = "{"; if ( $value ) { $jqoption .= "$parms : $value"; } else { $jqoption .= $parms; } $jqoption .= "}"; } //bw_trace2( $jqoption, "jqoption" ); return( $jqoption ); }