Function-returning array { OR } declare array at top of functions file?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I just wanted to know if it is wrong, or non-standard, for me to set-up functions that just return an array... example:

//////// function vert_links_array():
function vert_links_array() {
	return array(
'1' => array(S_MANCOM,'start.php?page=products& sub=mancom',S_MANCOM_TI,'mancom'), '2' => array(S_BRACLU,'start.php?page=products& sub=braclu',S_BRACLU_TI,'braclu'), '3' => array(S_BRASHO,'start.php?page=products& sub=brasho',S_BRASHO_TI,'brasho'), '4' => array(S_CALDIS,'start.php?page=products& sub=caldis',S_CALDIS_TI,'caldis'), '5' => array(S_CUSMAN,'start.php?page=products& sub=cusman',S_CUSMAN_TI,'cusman'), '6' => array(S_FRIDIS,'start.php?page=products& sub=fridis',S_FRIDIS_TI,'fridis'), '7' => array(S_GOVMIL,'start.php?page=products& sub=govmil',S_GOVMIL_TI,'govmil'), '8' => array(S_INDBRA,'start.php?page=products& sub=indbra',S_INDBRA_TI,'indbra'), '9' => array(S_INDLIN,'start.php?page=products& sub=indlin',S_INDLIN_TI,'indlin'), '10' => array(S_RAICAR,'start.php?page=products& sub=raicar',S_RAICAR_TI,'raicar'), '11' => array(S_SAWGUI,'start.php?page=products& sub=sawgui',S_SAWGUI_TI,'sawgui'), '12' => array(S_ASSPRO,'start.php?page=products& sub=asspro',S_ASSPRO_TI,'asspro')
	); // Add more here.
}

OR

Should I just put the above array at the top of my functions file and access it as a global within other functions?

Any suggestions? I am a self-taught php dude, so please don't laugh if this is a silly question.

Thanks.  :)
Cheers,
Micky

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux