PHP function help
<p>This is the function:</p>

<pre><code>function NewsDat($url="http://www.url.com/dat/news.dat", $max=5){
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $curlresult = curl_exec($ch);

    $posts = explode("\n", $curlresult); //chop it up by carriage return
    unset($curlresult);

    $num=0; 
    $result=array();
    foreach($posts as $post){
        $result[] = explode("::", $post);
        $num++;
        if($num&gt;$max-1){
            break;
        }
    }
    return $result; 
}

var_dump(NewsDat());
</code></pre>

<p>Which returns:</p>

<pre><code>array(5) { [0]=&gt;  array(14) { [0]=&gt;  string(10) "1183443434" [1]=&gt;  string(1) "R" [2]=&gt;  string(46) "Here is some text"...
</code></pre>

<p>I need to echo: <code>1183443434</code> and <code>Here is some text...</code></p>

<p>Can anyone help?</p>
