Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Dedicated server web hosting provided by Guru-host.eu.
escape warning

 
Post new topic   Reply to topic    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
point994
Smarty n00b


Joined: 27 Mar 2012
Posts: 1

PostPosted: Tue Mar 27, 2012 3:42 pm    Post subject: escape warning Reply with quote

Hi guys,
in php you can escape an error or warning with an '@'
f.e.:
echo @$a[2];

I would like to this also in smarty without using isset.

Is there any way?

f.e.:
{$a.2}

how can that be done???

Thanks a lot
Back to top
View user's profile Send private message
rodneyrehm
Administrator


Joined: 30 Mar 2007
Posts: 698
Location: Germany, border to Switzerland

PostPosted: Tue Mar 27, 2012 3:57 pm    Post subject: Reply with quote

Code:
{$this_variable_does_not_exist|default:""}
should do the trick
_________________
Twitter
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> General 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