Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

problema con regex_replace

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Spanish
View previous topic :: View next topic  
Author Message
antichrist
Smarty n00b


Joined: 05 Jan 2006
Posts: 2

PostPosted: Thu Jan 05, 2006 1:09 pm    Post subject: problema con regex_replace Reply with quote

index.php:
Code:
$sql = mysql_query("SELECT * FROM tabla WHERE id=1");
$row = mysql_fetch_array($sql);
$a = $row['campo'];

$smarty->assign('juas',$a);


index.tpl:
Code:
{$juas|regex_replace:"/[\r\t\n]/":"<br />"}


bien pues este codigo no funciona, simplemente no reemplaza nada, en cambio si hago lo siguiente, si que funciona y hace el reemplazo correctamente:

index.php:
Code:
$a = "prueba prueba \n prueba";
$smarty->assign('juas',$a);


a ver si alguien sabe decirme porque al recoger un campo de la base de datos deja de hacer el regex_replace correctamente.

Gracias desde ya a todos
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Spanish All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP