I was able to grab a list of authors in the site. I put echo to display the list of authors name - link of the author. Instead of echo'ing this code, I would like to store that information in arrays of "author" dictionaries. I would like to know how to code that with the author I grabbed from the code below. (<----Main question)

Most tutorial and searches i've found doesn't seem to help me. The reason why I would like to store them without displaying I need to go through the list of author through their url, and through those url i can get a list of their books and their content. I hope someone can help me code that way to display the author, book title, book contents. By the way, this would be total of 180 authors.

<?php

$url = file_get_contents('http://www.booksample.com');

preg_match_all('/<li><a href="(.*)">(.*)<\/a>/i', $url, $links);

?>

<p><strong>Author:</strong> <em>(Name - Link)</em><br />
<?php
echo '<ol>';
for($i = 0; $i < count($links[1]); $i++) {
echo '<li>' . $links[2][$i] . ' - ' . $links[1][$i] . '</li>';
}
echo '</ol>';
?>