SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    Patience... bronze trophy solidcodes's Avatar
    Join Date
    Jul 2006
    Location
    Philippines
    Posts
    936
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Arrow SMARTY question.

    Hi

    i have this codes below,

    Code:
    {if $castingdetails.0.city neq ""},
    	{$castingdetails.0.city}
    {/if}
    I just wonder what is 0 doing in the middle of $castingdetails and city?

    Is this concatenation variables? what are the dots for? also what is neq all about?

    Anyone would like to elaborate this codes please.

    Thank you in advance.

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,500
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    My guess is neq stands for "not equal".
    Can't help you with the rest, I've never used smarty.

  3. #3
    SitePoint Zealot adam.jimenez's Avatar
    Join Date
    May 2009
    Location
    Ware, UK
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    might be an array

    e.g.

    $castingdetails.0.city

    =

    $castingdetails[0]['city']

  4. #4
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,500
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    The result of a quick google search:
    http://www.smarty.net/manual/en/lang...unction.if.php
    http://www.smarty.net/manual/en/lang....variables.php

    Although there's no example on the second page with a numerical array key between dots, I'm sure adam is right

  5. #5
    SitePoint Wizard
    Join Date
    Mar 2008
    Posts
    1,149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's an array.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •