Search Help Board

PHP FAQ
PHP Articles
PHP Help
Bulletin Board

PHP Manual (NEW!)
First Time PHP'ers
Help with programming
Sql assignment help
PHP Homework Help


 
 Re: using array to define problem
Author:  (67.71.135.---)
Date:   02-26-04 16:12

Thanks Bastien.

So script 1 should change to:
define('_MI_HIWEEDBLOCKS_BNAME1,'group1');
define('_MI_HIWEEDBLOCKS_BNAME2,'group2');
....
define('_MI_HIWEEDBLOCKS_BNAME60,'group60');
define('_MI_HIWEEDBLOCKS_BNAME61','otherthings');


How about script 2 ?
for($tempi=1;$tempi<=60;$tempi++){
$modversion['blocks'][$tempi]['file'] = "latest_of_topic.php";
$modversion['blocks'][$tempi]['name'] = '_MI_HIWEEDBLOCKS_BNAME$tempi';
$modversion['blocks'][$tempi]['description'] = "Shows the last x articles of a topic";
$modversion['blocks'][$tempi]['show_func'] = "latest_of_topic_show";
$modversion['blocks'][$tempi]['edit_func'] = "latest_of_topic_edit";
$modversion['blocks'][$tempi]['options'] = "News|10|1";
}
$modversion['blocks'][61]['file'] = "random_partner.php";
$modversion['blocks'][61]['name'] = _MI_HIWEEDBLOCKS_BNAME61;
$modversion['blocks'][61]['description'] = "Shows a block with 1 random partner banner";
$modversion['blocks'][61]['show_func'] = "random_partners_show";



Best regards

David

 Topics Author  Date
 using array to define problem  new
David 02-26-04 15:17 
 Re: using array to define problem  new
bastien 02-26-04 15:59 
 Re: using array to define problem  new
David 02-26-04 16:12 
 Re: using array to define problem  new
john 04-12-04 19:37 
Go to Top  |  Go to Topic  |  Flat View  |  Search 
  |  
New Topic
 Reply To This Message
 Your Name:
 Your Email:
 Subject:
Email replies to this thread, to the address above.
    

Provided By
Phorum