SV: [SMARTY] quick question

From: Date: Mon, 14 Apr 2003 19:25:56 +0000
Subject: SV: [SMARTY] quick question
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9252@lists.php.net to get a copy of this message
Hello Luis, Sorry, didn't read it properly ... :-) Well, it's possible, but not pretty. {assign var="foo" value="klasjdlfjljjsalkjfklsajkljklajksmartyiscoollfjlkjljajfl"} {capture name="test"}{$foo|count_characters}{/capture} {math equation = "x / 80" x=$smarty.capture.test assign=rows} /Jan -----Oprindelig meddelelse----- Fra: luis [mailto:luis@fuegolabs.com] Sendt: 14. april 2003 21:16 Til: 'Jan H. Andersen'; 'Smarty General' Emne: RE: [SMARTY] quick question I don't want to set the rows to the number of characters but characters/80 Would you like to edit a single line text in a 80-row long textarea ? :-) -----Original Message----- From: Jan H. Andersen [mailto:jha@sjovide.dk] Sent: Monday, April 14, 2003 4:12 PM To: 'Smarty General' Subject: SV: [SMARTY] quick question How about using <textarea rows="{$foo|count_characters}"> ? /Jan -----Oprindelig meddelelse----- Fra: luis [mailto:luis@fuegolabs.com] Sendt: 14. april 2003 21:02 Til: 'Smarty General' Emne: [SMARTY] quick question I want to build a textarea with x rows being x the strlen of $foo (A smarty variable) {math equation = "x / 80" x=strlen($foo) assign=rows} does not work, ideas? -- Smarty General Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Smarty General Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.smarty.general (#9252) next »