Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/04/2012, 08:30
Avatar de LiPoxZ
LiPoxZ
 
Fecha de Ingreso: abril-2012
Mensajes: 4
Antigüedad: 12 años
Puntos: 0
De un include llamar la variable

holas miren tengo este include (funcion.php)

Código PHP:
<?php
function seguridad($cadena)
{
return 
htmlentities(trim(addslashes(stripslashes(str_replace("%20"," ",$cadena)))));
}
function 
abrirArchivo($ruta)
{
$contenido file_get_contents($ruta);
return 
$contenido
}
function 
uniformidadXML($xmls)
{
$xml $xmls;
$myxml str_replace("titulo","title",$xml);
$myxml str_replace("url","url",$myxml);
$myxml str_replace("\n","",$myxml);
$myxml str_replace("<songs>","",$myxml);
$myxml str_replace("</songs>","",$myxml);
$myxml str_replace("<musica","<song",$myxml);
$myxml str_replace("'",'"',$myxml);
return 
$myxml;
}
function 
obj($m,$cad)
{
$trozos explode(" - ",$cad);
if(
$m == 'a')
{return 
$trozos[0];
}else if(
$m == 't')
{return 
$trozos[1];
}
}
function 
showArray($xml)
{
preg_match_all('/title="(.*?)"/',$xml,$titulo);
preg_match_all('/path="(.*?)"/',$xml,$url);
$total count($url[1]); 
for(
$n 0;$n<$total;$n++)
{
 
$array obj("t",$titulo[1][$n])."*";
 
$array.= obj("a",$titulo[1][$n])."*";
 (
$n == $total-1)? $array.= $url[1][$n]: $array.=$url[1][$n]."@";
 echo 
$array;
}
}
function 
showPlaylist($xml)
{
preg_match_all('/title="(.*?)"/',$xml,$titulo);
preg_match_all('/path="(.*?)"/',$xml,$url);
$total count($url[1]); 
//echo "<div align='left'><table bgcolor='FFFFFF' cellspacing='0' cellpadding='0'>\n<tbody>\n";
for($n 0;$n<$total;$n++)
{
$numeral $n+1;
$tit =  obj("t",$titulo[1][$n]);
$artista obj("a",$titulo[1][$n]);

$artista=ucwords(strtolower($artista));
$tit=ucwords(strtolower($tit));

$html ="<tr id='pl_".$n."'onMouseOver ='overM(this);' onMouseOut = outM(this);>\n";
$html .="<td width='280' class='playlix' title='$artista - $tit' href=\"#\" onClick=\"getMusica(".$n.");you('".$artista." - ".$tit."');\">";
//$html .="<td class='playlix' href=\"#\" onClick=\"getMusica(".$n.");you('".$artista." - ".$tit."');lyrc('".$artista." - ".$tit."');\">";
$html .="<span>".$numeral.".- ".$artista." - ".$tit."</td><td width='90'><img src=\"img/fb.gif\" title=\"Compartir En Facebook : $artista - $tit\" <a href=\"mp3.php?tema=".$artista." - ".$tit."&url=".$url[1][$n]."\"></a><a onClick=\"lyrc('".$artista." - ".$tit."');\"><img src=\"img/letr_d.gif\" title=\"Letra : $artista - $tit\"></a><a onClick=\"you('".$artista." - ".$tit."');\" title=\"Video : $artista - $tit\"><img src=\"img/vid_d.gif\"/></a><a href=\"Utiles/mp3.php?down=".$url[1][$n]."&name=".$artista." - ".$tit."\"><img src=\"img/mp3_d.gif\" title=\"Descargar : $artista - $tit\"></a></td></span></td>\n";
$html .="</tr>\n";

echo 
$html;

}
//echo "</tbody>\n</table></div>";
}
?>
en si yo quisiera jalar esto ami index <a href=\"mp3.php?down=".$url[1][$n]."&name=".$artista." - ".$tit."\">

intente lo que havia en otro post :

Código PHP:
<?php
include 'funcion.php';
echo 
"$url["1"]";
?>
pero no me sale t.t