For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > December 2004 > Re: [SMARTY] Checking if variable is integer









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] Checking if variable is integer
Monte Ohrt

2004-12-07, 4:04 pm

You can use php functions in if statements.

{if is_int($foo)} ... {/if}

John Nichel wrote:

> Is there a way in Smarty to check if a variable is an integer, or
> would I need to drop out into php for that?
>

Sponsored Links







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

Copyright 2008 codecomments.com