PHP code example of phyozawtun / composer-myanmar-national-registration-nrc-card

1. Go to this page and download the library: Download phyozawtun/composer-myanmar-national-registration-nrc-card 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/ */

    

phyozawtun / composer-myanmar-national-registration-nrc-card example snippets


  
$array = getNRC();
var_dump($array);


  
$array1 = getNRC(12);
var_dump($array1); // Output disticts with state_id 12 only

  
$array2 = getNRC([12,6,7]); // Output disticts with state_id 12, 6 and 7 only
var_dump($array2);


// This output will be valid
$state_id = 12;
$distict = "BaTaHta";
$reg_no = 010203;
$is_valid = isNRC($state_id,$distict,$reg_no,$lang);
var_dump($is_valid);

// This output will be invalid
$lang = "mm";
$is_valid = isNRC($state_id,$distict,$reg_no,$lang);
var_dump($is_valid);