PHP code example of psychology-tools / pubmed-cite

1. Go to this page and download the library: Download psychology-tools/pubmed-cite 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/ */

    

psychology-tools / pubmed-cite example snippets




use PsychologyTools\PubmedCite\PubmedCite;

$pubmed = new PubmedCite();

$p->queue('11111'); // queue single pmid as string
$p->queue(12345);   // or as an int
$p->queue( ['43234',42234] ); // or either as an array
$p->queue( '344334,22424,444444'); // or as a comma separated string
$p->queue( '424245 X 455534 X 4534343' ); // or any kind of separated string

$citations = $pubmed->fetch_queued();  // returns an array of citation data objects indexed by pmid
var_dump($citations);