functions and variables ..

From: Date: Thu, 14 Sep 2000 11:41:06 +0000
Subject: functions and variables ..
Groups: php.general 
Request: Send a blank email to php-general+get-16751@lists.php.net to get a copy of this message
Hi all I'm having a small design problem .. that I hope sombody will help me with .. I've just started with classes and still strugling a bit .. so i'm trying to do functions that can easely be moved over to be used in classes .. so I have 3 functions .. font_gen(), bg_gen(), and create_template() font_gen takes 3 variables and bg_gen 3 variables as well font_gen and bg_gen returns an array with data, while create_template uses the arrays from font_gen and bg_gen to create the template. so create_template calls both font_gen and bg_gen to create template here is mock up function font_gen($var1,$var2,$var3{ return $font } function bg_gen($var4,$var5,$var6{ return $bg } functions create_template($var7){ font_gen(); bg_gen(); print" blah blah font_gen data and bg_gen data"; } do i have to pass the font_gen and bg_gen variable thru create_template as well .. or will it be able to see it it would just be easer to assign the values of $var1-6 in my php file then include the functions and run then rather then to have to pass the variable thru create_template to get font_gen and bg_gen to run Henti

« previous php.general (#16751) next »