|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
institutocriap Smarty n00b
Joined: 17 Jul 2018 Posts: 2
|
Posted: Tue Jul 17, 2018 3:45 pm Post subject: Smarty Tags in MySql Row |
|
|
Hello, i need some help.
I have a php function with Query.
In one colum from BD i have in backend an html editor.
I want, if users try to write Smarty Tags, like an example:
{TestSmarty Name="Angelo"}
in my function find all smarty tags and replace with content.
My function is some like this
Code: |
function Testing(){
try{
$sql = 'SELECT Content FROM Table';
$stmt = $CONECTION->prepare($sql);
$stmt->execute();
$result = $stmt->fetch(PDO::FETCH_ASSOC);
}
catch(PDOException $ex){
$ex->getMessage();
}
}
|
The Content Column in database have
{TestSmarty Name="Angelo"}
How assign TestSmarty from my query? |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
|
Back to top |
|
institutocriap Smarty n00b
Joined: 17 Jul 2018 Posts: 2
|
Posted: Wed Jul 18, 2018 8:21 am Post subject: |
|
|
A read, but i dont understand how can do this, can you provide some light to start?an example please? |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Wed Jul 18, 2018 12:18 pm Post subject: |
|
|
If only you have actually read it, you'd see all the examples.
Please stop lying. |
|
Back to top |
|
|
|
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
|