How do I ready my post data into an array

Hi

How do I read all my post data into an array?

Here is my code:

<?php

   define  ("WP_USE_THEMES", false);
   require ("wp-load.php");
   require ("kath-functions.php");

   $count_posts           = wp_count_posts();
   $total_published_posts = $count_posts->publish;

   if ($total_published_posts > 0)
   {
       read title,post date, content into an array
   }
   else
   {
       print ("NO POSTS FOUND");
       exit();
   }




?>

$array = array();
$args = array(
‘numberposts’ => -1
);

    $posts = get_posts($args);      
    foreach ($posts as $post){
        array_push( $array, array(
            "id" =&gt; get_the_ID($post-&gt;ID),
            "title" =&gt; get_the_title($post-&gt;ID),
            "body" =&gt; get_the_content($post-&gt;ID),
            "link" =&gt; get_the_permalink($post-&gt;ID)
        )); 
    }