We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, great library, it's been a lot of help! I'm not sure if this is where I put questions like this, if not I'll post it somewhere else.
For some reason though, I always have "Array() Array()" before every individual.
Here's my code:
spl_autoload_register(function ($class) { $pathToPhpGedcom = __DIR__ . '/plugins/'; // TODO FIXME if (!substr(ltrim($class, '\\'), 0, 7) == 'PhpGedcom\\') { return; } $class = str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php'; if (file_exists($pathToPhpGedcom . $class)) { require_once($pathToPhpGedcom . $class); } }); $parser = new \PhpGedcom\Parser(); $gedcom = $parser->parse('sampleged.ged'); echo "<br /><br />"; foreach ($gedcom->getIndi() as $individual) { echo $individual->getId() . ': ' . current($individual->getName())->getSurn() . ', ' . current($individual->getName())->getGivn(); } ?>
And here's what I get:
Array ( [0] => Anakin /Skywalker/ ) Array ( [0] => Anakin ) Array ( [0] => Skywalker ) Array ( [0] => Padme /Amidala/ ) Array ( [0] => Padme ) Array ( [0] => Amidala ) Array ( [0] => Luke /Skywalker/ ) Array ( [0] => Luke ) Array ( [0] => Skywalker )
Array ( ) Array ( ) I1: Skywalker, AnakinArray ( ) Array ( ) I2: Amidala, PadmeArray ( ) Array ( ) I3: Skywalker, Luke
Also, is there a solution for removing this info: Array ( [0] => Anakin /Skywalker/ ) Array ( [0] => Anakin ) Array ( [0] => Skywalker ) Array ( [0] => Padme /Amidala/ ) Array ( [0] => Padme ) Array ( [0] => Amidala ) Array ( [0] => Luke /Skywalker/ ) Array ( [0] => Luke ) Array ( [0] => Skywalker )
that appears at the top no matter what I change in the code it seems.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, great library, it's been a lot of help! I'm not sure if this is where I put questions like this, if not I'll post it somewhere else.
For some reason though, I always have "Array() Array()" before every individual.
Here's my code:
And here's what I get:
Array ( [0] => Anakin /Skywalker/ ) Array ( [0] => Anakin ) Array ( [0] => Skywalker ) Array ( [0] => Padme /Amidala/ ) Array ( [0] => Padme ) Array ( [0] => Amidala ) Array ( [0] => Luke /Skywalker/ ) Array ( [0] => Luke ) Array ( [0] => Skywalker )
Array ( ) Array ( ) I1: Skywalker, AnakinArray ( ) Array ( ) I2: Amidala, PadmeArray ( ) Array ( ) I3: Skywalker, Luke
Also, is there a solution for removing this info:
Array ( [0] => Anakin /Skywalker/ ) Array ( [0] => Anakin ) Array ( [0] => Skywalker ) Array ( [0] => Padme /Amidala/ ) Array ( [0] => Padme ) Array ( [0] => Amidala ) Array ( [0] => Luke /Skywalker/ ) Array ( [0] => Luke ) Array ( [0] => Skywalker )
that appears at the top no matter what I change in the code it seems.
The text was updated successfully, but these errors were encountered: