Ver Mensaje Individual
  #14 (permalink)  
Antiguo 16/12/2010, 10:21
Avatar de dropthebass
dropthebass
 
Fecha de Ingreso: abril-2008
Mensajes: 27
Antigüedad: 16 años
Puntos: 0
Respuesta: Dar formato a texto devuelto en una función PHP

En realidad no lleva el punto y coma en el valor, todavía no he tenido tiempo de investigarlo a fondo, pero tampoco se me ocurre nada...dejo el código actual, gracias.

Código PHP:
function the_title($before ''$after ''$echo true) { 
    
$title get_the_title(); 

    if ( 
strlen($title) == 
        return; 

    
$title $before $title $after

    if ( 
$echo 
    { 
         
        
$caracter='&#8211';  
        
$titulo explode($caracter$title);  
        
$autor =$titulo[0];  
        
$cancion =$titulo[1];
         
        echo  
$autor."<br><font color='grey'>\"".$cancion." \"</font>"

     
    } 
    else 
        return 
$title