php/WP_CLI/Formatter.php
private function assoc_array_to_rows( $fields ) {
		$rows = array();

		foreach ( $fields as $field => $value ) {

			if ( ! is_string( $value ) ) {
				$value = json_encode( $value );
			}

			$rows[] = (object) array(
				'Field' => $field,
				'Value' => $value,
			);
		}

		return $rows;
	}
private function assoc_array_to_rows( $fields ) {
		$rows = array();

		foreach ( $fields as $field => $value ) {

			if ( ! is_string( $value ) ) {
				$value = json_encode( $value );
			}

			$rows[] = (object) array(
				'Field' => $field,
				'Value' => $value,
			);
		}

		return $rows;
	}
private function assoc_array_to_rows ( $ fields ) { $ rows = array ( ) ; foreach ( $ fields as $ field => $ value ) { if ( ! is_string ( $ value ) ) { $ value = json_encode ( $ value ) ; } $ rows [ ] = ( object ) array ( 'Field' => $ field , 'Value' => $ value , ) ; } return $ rows ; }
Format an associative array as a table.

@param array     $fields    Fields and values to format
@return array    $rows
Format an associative array as a table .