PHP code example of frozzare / papi-property-table

1. Go to this page and download the library: Download frozzare/papi-property-table library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

frozzare / papi-property-table example snippets




$fields = [
    ['Name', 'facility_name'],
    ['ID', 'facility_id'],
    ['Location', 'facility_location_name'],
    ['E-email', 'facility_email'],
    ['Address', 'facility_street_address'],
    ['Zip code', 'facility_zip_code']
];

foreach ( $fields as $k => $v ) {
    $fields[$k][1] = get_post_meta( $_GET['post'], $v[1], true );
}

$this->box( [
    'title'   => 'Facility information',
    'context' => 'side'
], [
    papi_property( [
        'sidebar'  => false,
        'title'    => 'Facility information',
        'type'     => 'table',
        'settings' => [
            'items' => $fields
        ]
    ] )
] );