PHP - Error de sintáxis

 
Vista:

Error de sintáxis

Publicado por Ensy (19 intervenciones) el 01/10/2010 14:20:19
Hola, alguien me puede decir el error de sintáxis que hay en este código?? Muchas gracias!!!

Código:
function ReadMetaTags($html)
{
//! @return void
//! @desc Pass meta tag info to PDF file properties
$regexp = '/ (\\w+?)=([^\\s>"]+)/si'; // changes anykey=anyvalue to anykey="anyvalue" (only do this when this happens inside tags)
$html = preg_replace($regexp," \$1=\"\$2\"",$html);
$regexp = '/<meta .*?(name|content)="(.*?)" .*?(name|content)="(.*?)".*?>/si';
preg_match_all($regexp,$html,$aux);

$firstattr = $aux[1];
$secondattr = $aux[3];
for( $i = 0 ; $i < count($aux[0]) ; $i++)
{

$name = ( strtoupper($firstattr[$i]) == "NAME" )? strtoupper($aux[2][$i]) : strtoupper($aux[4][$i]);
$content = ( strtoupper($firstattr[$i]) == "CONTENT" )? $aux[2][$i] : $aux[4][$i];
switch($name)
{
case "KEYWORDS": $this->SetKeywords($content); break;
case "AUTHOR": $this->SetAuthor($content); break;
case "DESCRIPTION": $this->SetSubject($content); break;
}
}
//Comercial do Aplicativo usado (no caso um script):
$this->SetCreator("HTML2FPDF >> http://html2fpdf.sf.net");
}

Saludos!
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Error de sintáxis

Publicado por Pepe (54 intervenciones) el 12/10/2010 21:17:23
Tienes dos variables $regexp y no hay declarado ningun array $aux
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar