mira..
if (1<2)
print 'a';
print 'b';
siempre imprimira 'b'; sin importar la condicion del IF (ya ke no esta dentro del bloke)
pero si....
if (3>2)
{
print 'a';
print 'B';
}
de este otro modo... se imprimen cuantas sentencias dentro del bloke, solo si se cumple la condicion... mira debes hacer esto...
Código PHP:
<?php
$db_host="";
$db_user="";
$db_pass="";
$db_name="";
$link = mysql_connect($db_host,$db_user,$db_pass);
mysql_select_db($db_name, $link);
$url = "www.dominio.com";
$get = file_get_contents($url);
# link
$parser='|<td class="([^<]+)">([^<]+)</td>|is';
if( preg_match_all($parser, $get, $title) )
{
for ($j=0;$j<count($title[1]);$j++)
{
print $title[2][$j]."<br>";
}
}
# nombre
$parser='|<a href="([^<]+)" target="_blank">([^<]+)</a></td>|is';
if( preg_match_all($parser, $get, $title) )
{
for ($j=0;$j<count($title[1]);$j++)
{
print $title[1][$j]."<br>";
mysql_query("INSERT INTO contenido (name, link) VALUES ('".$title[2][$j]."', '".$title[1][$j]."')");
}
}
?>
haber si con eso me expliko...