|
|
#1 |
|
The Master
Join Date: Mar 2006
Location: British in Argentina
Posts: 1,400
Rep Power: 44 ![]() ![]() |
I think I have had this problem and just cant remember where i found the answer.
What is happening is I am trying to loop an <option> here is the code I have used PHP Code:
Have I done something trivial here???
__________________
**Bulk Upload System** has been upgraded. Works on all v4 versions with new functionality. Free upgrade for existing customers. |
|
|
|
|
#2 |
|
Moderator
|
why not use foreach?
HTML Code:
<option value="">Select a Team</option> {foreach from=$teams item=item} <option value="{$item.TID}">{$item.name}</option> {/foreach} |
|
|
|
|
#3 |
|
The Master
Join Date: Mar 2006
Location: British in Argentina
Posts: 1,400
Rep Power: 44 ![]() ![]() |
Well I probably can but it is bugging me now as I have this piece of dotted about my site with no probs whatsoever.
I will try the foreach though.
__________________
**Bulk Upload System** has been upgraded. Works on all v4 versions with new functionality. Free upgrade for existing customers. |
|
|
|
|
#4 |
|
Moderator
Join Date: Mar 2006
Posts: 4,227
Rep Power: 103 ![]() ![]() |
see if adding start=1 helps.....
PHP Code:
__________________
Larry. (Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free) Set your site apart from the competition with one of my modules...... Google Map Module | You Tube Module | Google Calendar Module | Event Calendar Module 68 Classifieds Important Links Customer Area | Issue Tracker | Knowledge Base | User Manuals |
|
|
|
|
#5 |
|
The Master
Join Date: Mar 2006
Location: British in Argentina
Posts: 1,400
Rep Power: 44 ![]() ![]() |
Works thanks Juven.
Just to let you know that the fantasy sports mod should be finished by the end of this week. Im just doing the admin panel as we speak. This version will be perfect for the FIFA World Cup.
__________________
**Bulk Upload System** has been upgraded. Works on all v4 versions with new functionality. Free upgrade for existing customers. |
|
|
|
|
#6 |
|
The Master
Join Date: Mar 2006
Location: British in Argentina
Posts: 1,400
Rep Power: 44 ![]() ![]() |
Thanks Larry, but for some reason my array starts at 0 yet doesnt display the 0 when I debug.
PHP Code:
__________________
**Bulk Upload System** has been upgraded. Works on all v4 versions with new functionality. Free upgrade for existing customers. |
|
|
|
|
#7 |
|
Moderator
|
Can you post the entire section where you create the array before passing it to the template?
|
|
|
|
|
#8 |
|
The Master
Join Date: Mar 2006
Location: British in Argentina
Posts: 1,400
Rep Power: 44 ![]() ![]() |
PHP Code:
__________________
**Bulk Upload System** has been upgraded. Works on all v4 versions with new functionality. Free upgrade for existing customers. |
|
|
|
|
#9 |
|
Moderator
|
I hear you, I am the same way. I just wanted to be sure that wasn't the problem. Section should start at 0 by default, so it is strange behavior.
Just curious, but try adding a comma after PHP Code:
|
|
|
|
|
#10 |
|
The Master
Join Date: Mar 2006
Location: British in Argentina
Posts: 1,400
Rep Power: 44 ![]() ![]() |
Caused an error with the comma in Juven.
THis thing is really coming together now, quite proud of myself. I will post you a screen shot tomorrow!
__________________
**Bulk Upload System** has been upgraded. Works on all v4 versions with new functionality. Free upgrade for existing customers. |
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Smarty Templates and You. Posted BY Lhotch | Eric Barnes | HTML, CSS, and Design Help | 13 | 10-02-2007 08:06 AM |
| Displaying a Multidimensional Array Results in Smarty | Maffo | v3.1 Questions & Support | 7 | 12-20-2006 08:41 AM |
| List of Smarty Variables and Arguments? | bgordon | v3.1 Modules & Modifications | 5 | 09-12-2006 03:06 PM |
| Smarty TPL and Rotations | xanthari | HTML, CSS, and Design Help | 1 | 07-20-2006 04:02 PM |
| Smarty Error | ropingtony | v3.1 Questions & Support | 3 | 07-19-2006 05:03 PM |