1. Go to this page and download the library: Download xp-forge/neo4j 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/ */
xp-forge / neo4j example snippets
use com\neo4j\Graph;
use util\cmd\Console;
$g= new Graph('http://user:[email protected]:7474/db/data');
$q= $g->open('MATCH (t:Topic) RETURN t.name, t.canonical');
foreach ($q as $record) {
Console::writeLine('#', $record['t.canonical'], ': ', $record['t.name']);
}
use com\neo4j\Graph;
use util\cmd\Console;
$g= new Graph('http://user:[email protected]:7474/db/data');
$g->query('CREATE (p:Person) SET t.name = %s, t.id = %d', $name, $id);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.