protected function build_table( array $arr, $child = false ) {
		$html = '<div class="papi-property-table"><table class="papi-table">';
		$allow_html = $this->get_setting( 'allow_html' );

		if ( $child ) {
			$html .= '<thead>';

			foreach ( $arr[0] as $key => $value ) {
				if ( $allow_html ) {
					$key = html_entity_decode( $key );
				}

				$html .= sprintf( '<th>%s</th>', $key );
			}

			$html .= '</thead>';
		}

		foreach ( $arr as $key => $value ) {
			$html .= '<tr>';

			foreach ( $value as $key2 => $value2 ) {
				if ( is_array( $value2 ) ) {
					$value2 = $this->build_table( $value2, true );
				}

				$value2 = papi_convert_to_string( $value2 );

				if ( $allow_html ) {
					$value2 = html_entity_decode( $value2 );
				}

				$html .= sprintf( '<td>%s</td>', $value2 );
			}

			$html .= '</tr>';
		}

		return $html . '</table></div>';
	}
protected function build_table( array $arr, $child = false ) {
		$html = '<div class="papi-property-table"><table class="papi-table">';
		$allow_html = $this->get_setting( 'allow_html' );

		if ( $child ) {
			$html .= '<thead>';

			foreach ( $arr[0] as $key => $value ) {
				if ( $allow_html ) {
					$key = html_entity_decode( $key );
				}

				$html .= sprintf( '<th>%s</th>', $key );
			}

			$html .= '</thead>';
		}

		foreach ( $arr as $key => $value ) {
			$html .= '<tr>';

			foreach ( $value as $key2 => $value2 ) {
				if ( is_array( $value2 ) ) {
					$value2 = $this->build_table( $value2, true );
				}

				$value2 = papi_convert_to_string( $value2 );

				if ( $allow_html ) {
					$value2 = html_entity_decode( $value2 );
				}

				$html .= sprintf( '<td>%s</td>', $value2 );
			}

			$html .= '</tr>';
		}

		return $html . '</table></div>';
	}
protected function build_table ( array $ arr , $ child = false ) { $ html = '<div class="papi-property-table"><table class="papi-table">' ; $ allow_html = $ this -> get_setting ( 'allow_html' ) ; if ( $ child ) { $ html .= '<thead>' ; foreach ( $ arr [ 0 ] as $ key => $ value ) { if ( $ allow_html ) { $ key = html_entity_decode ( $ key ) ; } $ html .= sprintf ( '<th>%s</th>' , $ key ) ; } $ html .= '</thead>' ; } foreach ( $ arr as $ key => $ value ) { $ html .= '<tr>' ; foreach ( $ value as $ key2 => $ value2 ) { if ( is_array ( $ value2 ) ) { $ value2 = $ this -> build_table ( $ value2 , true ) ; } $ value2 = papi_convert_to_string ( $ value2 ) ; if ( $ allow_html ) { $ value2 = html_entity_decode ( $ value2 ) ; } $ html .= sprintf ( '<td>%s</td>' , $ value2 ) ; } $ html .= '</tr>' ; } return $ html . '</table></div>' ; }
Build table from array data.

@param  array $arr
@param  bool  $child

@return stringe
Build table from array data .