Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Search found 12 matches
Smarty Forum Index
Author Message
  Topic: Foreach initialized even when it's empty
Kian987

Replies: 3
Views: 6172

PostForum: General   Posted: Thu May 12, 2016 3:18 pm   Subject: Foreach initialized even when it's empty
I correct myself. There was a syntax error for real but the main question still remains: why Smarty initializes empty foreach loops?
  Topic: Foreach initialized even when it's empty
Kian987

Replies: 3
Views: 6172

PostForum: General   Posted: Thu May 12, 2016 2:29 pm   Subject: Foreach initialized even when it's empty
Hi,

I'm facing a very tricky issue because Smarty is doing nonsensical things.
{foreach from=$array item=item key=key}
{if $variable1[$variable2[$key]]}&# ...
  Topic: substr multibyte character with Smarty
Kian987

Replies: 2
Views: 5090

PostForum: General   Posted: Thu Aug 29, 2013 7:40 am   Subject: substr multibyte character with Smarty
Thank you. I fixed your code (: instead of ,):
{$whatever|regex_replace:"/[^0-9\.]+/":""}

Anyway i know that i should make this kind of modifications ...
  Topic: substr multibyte character with Smarty
Kian987

Replies: 2
Views: 5090

PostForum: General   Posted: Wed Aug 28, 2013 10:43 am   Subject: substr multibyte character with Smarty
Hi

I've a problem with a variable. My {$whatever} Smarty variable stores this value "$25.00" and i want to remove the $ symbol. Even if i can do it easly with {$whatever|substr:1}, this m ...
  Topic: Pass PHP variable inside a while to Smarty?
Kian987

Replies: 4
Views: 6690

PostForum: General   Posted: Fri Dec 07, 2012 10:42 am   Subject: Pass PHP variable inside a while to Smarty?
Ty. It was a problem of mine. I was already sending the output to Smarty properly. The problem was with a stupid $result (2 tables with same column name in a join). My bad.
  Topic: Pass PHP variable inside a while to Smarty?
Kian987

Replies: 4
Views: 6690

PostForum: General   Posted: Tue Dec 04, 2012 9:19 am   Subject: Pass PHP variable inside a while to Smarty?
Yes but how can i get the variable on template? The array is always empty on Smarty.
  Topic: Pass PHP variable inside a while to Smarty?
Kian987

Replies: 4
Views: 6690

PostForum: General   Posted: Mon Dec 03, 2012 6:00 pm   Subject: Pass PHP variable inside a while to Smarty?
Argh Evil or Very Mad Hi all

Ok. It seems that i can't find out how to pass my php variable to Smarty out from the while. This is my php.
$result = mysql_query("SELECT id, name FROM tbl WHERE name! ...
  Topic: Short question: variable in element name
Kian987

Replies: 0
Views: 2593

PostForum: General   Posted: Thu Nov 22, 2012 10:38 am   Subject: Short question: variable in element name
Hi

Short question.

{$LANG.statusbanned}

I want to add a variable in the name of the element. It's something like this:

{assign var="action" value="banned&quo ...
  Topic: 3-dimensional array: smarty or php?
Kian987

Replies: 4
Views: 6630

PostForum: General   Posted: Fri Nov 16, 2012 8:06 am   Subject: 3-dimensional array: smarty or php?
As far I remember with multidimensional arrays, there was a weird thing after 2nd level,

$arr
Exactly. I get weird results. It's someting like "M 0 b F 8 N" (first letter/number of all 3 ...
  Topic: 3-dimensional array: smarty or php?
Kian987

Replies: 4
Views: 6630

PostForum: General   Posted: Thu Nov 15, 2012 4:57 pm   Subject: 3-dimensional array: smarty or php?
Hi

clients => Array (20)
0 => Array (2)
name => Mark
info => Array (1)
gender => Male
1 => Array (2)
name => Sara
info => ...
  Topic: Tricky question: conditional display foreach/continue
Kian987

Replies: 2
Views: 6057

PostForum: General   Posted: Fri Sep 14, 2012 7:31 am   Subject: Tricky question: conditional display foreach/continue
Rrrr that's why {continue} doesn't work. It seems that my tricky question has been solver by a simple if Smile Thank you for your time Tews.
  Topic: Tricky question: conditional display foreach/continue
Kian987

Replies: 2
Views: 6057

PostForum: General   Posted: Thu Sep 13, 2012 11:06 am   Subject: Tricky question: conditional display foreach/continue
Hi

I'm a new user with a mega-tricky question Rolling Eyes I use WHMCS and its php code is obfuscaded with ioncube. I'm not even able to know the full output/input of a script. After this preamble i jum ...
 
Page 1 of 1
All times are GMT
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP