Insert statement not working in foreach statement
<p>I have a crawler which crawls the sites that begin with www.bbc.co.uk/news. It it grabs all the links that start with <a href="http://www.bbc.co.uk/news" rel="nofollow">http://www.bbc.co.uk/news</a> and finds their description, link and title and inserts them into a database. </p>

<p>For some reason, it doesn't seem to be inserting.</p>

<p>Any ideaS?</p>

<p>PS There is completely not output, completely blank web page</p>

<pre><code>   foreach ($links as $link) {
    $output = array(
"title"       =&gt; Titles($link), //dont know what Titles is, variable or string?
"description" =&gt; getMetas($link),
"keywords" =&gt; getKeywords($link), 
"link"        =&gt; $link                 
 );
if (empty($output["description"])) {
$output["description"] = getWord($link);
 }

 if (substr($ouput, 0, 26) == "http://www.bbc.co.uk/news/") {

 $data = '"' . implode('" , "', $output) . '"';
 $success = mysql_query( "INSERT INTO news_story (`title`, `description` , `keywords`, `link`)
 VALUES (" . $data . ")") or zerror_reporting();
 if ($sucess) {
echo "YEAH!";
   }

   if (!$sucess) {
echo "NO!!";
    }
    print_r($data);
     }}
</code></pre>
