For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > March 2004 > Re: [SMARTY] Boolean to string









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [SMARTY] Boolean to string
Patrick Pletscher

2004-03-27, 12:31 am

Hi,

> I am wondering if there is a way in Smarty to convert a boolean value to
> its string representation (ie 'True' or 'False').


Why not using something like this:

{if $VAR}
True
{else}
False
{/if}

Quick and dirty... I guess there is a much nicer possibility to do so,
but I think that should do it...

Sincerly Patrick
--
Patrick Pletscher
http://www.galaxysoft.ch
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com