Current time: 11-27-2024, 08:16 AM Hello There, Guest! (LoginRegister)


Post Reply 
How to add Array in template file?
Author Message
max Offline
Junior Member
*

Posts: 17
Joined: Dec 2010
Reputation: 0
Post: #1
Question How to add Array in template file?
Hello I work on new improvement about billing in ISPcp.
The work I'll show, when it's done.
The question is:
Is possible to output orderpanel with custom array length?
How can I write this php code in .tpl?
PHP Code:
<?php
$domain
=Array();
$domain["com"]=Array("20","$","month");
$domain["eu"]=Array("21","Euro","month");
...
?>
<?php 
foreach($domain as $item => $value) { ?>        
        <tr>
            <td class="content"><img src="../images/domain.png" alt="<?php echo $item?>" />&nbsp;&nbsp;<?php echo $item?></td>
            <td class="content"><?php echo $value[0]." ".$value[1]."/".$value[2]; ?></td>
        </tr>
<?php ?>
12-27-2010 05:06 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
How to add Array in template file? - max - 12-27-2010 05:06 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)