RE: [PHP] problem calling functions

2007-10-20 Thread Zoltán Németh
2007. 10. 19, péntek keltezéssel 11.33-kor Jay Blanchard ezt írta: [snip] ?php function solution1($var1){ // some code } function solution2($var2){ // some code } function solution3($var3){ // some code } if ($function == 'solution1' or $function ==

Re: [PHP] problem calling functions

2007-10-20 Thread Robin Vickery
On 19/10/2007, afan pasalic [EMAIL PROTECTED] wrote: Robin Vickery wrote: On 19/10/2007, afan pasalic [EMAIL PROTECTED] wrote: hi I have a problem with calling functions: ?php function solution1($var1){ // some code } function solution2($var2){ // some

Re: [PHP] problem calling functions

2007-10-19 Thread Stut
Jay Blanchard wrote: I don't think you can put a function name in a variable and call it like $function($var). Yes you can - it's basically the same as variable variables. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] problem calling functions

2007-10-19 Thread afan pasalic
yup! it works perfect. obviously, it's MY fault. :-) thanks stut -afan Stut wrote: afan pasalic wrote: actually, what example you are talking about? I got jay's example only? http://dev.stut.net/php/varfunc.php -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] problem calling functions

2007-10-19 Thread Stut
afan pasalic wrote: actually, what example you are talking about? I got jay's example only? http://dev.stut.net/php/varfunc.php -Stut -- http://stut.net/ Stut wrote: afan pasalic wrote: why then the code doesn't work? the error I'm getting is: Fatal error: Call to undefined function

Re: [PHP] problem calling functions

2007-10-19 Thread afan pasalic
why then the code doesn't work? the error I'm getting is: Fatal error: Call to undefined function solution1() in ... even the function itself is just above the line that calls function? -afan Stut wrote: Jay Blanchard wrote: I don't think you can put a function name in a variable and call it

Re: [PHP] problem calling functions

2007-10-19 Thread afan pasalic
Jay Blanchard wrote: [snip] [snip] ?php function solution1($var1){ // some code } function solution2($var2){ // some code } function solution3($var3){ // some code } if ($function == 'solution1' or $function == 'solution2' or $function == 'solution3') {

Re: [PHP] problem calling functions

2007-10-19 Thread afan pasalic
Robin Vickery wrote: On 19/10/2007, afan pasalic [EMAIL PROTECTED] wrote: hi I have a problem with calling functions: ?php function solution1($var1){ // some code } function solution2($var2){ // some code } function solution3($var3){ // some code }

RE: [PHP] problem calling functions

2007-10-19 Thread Jay Blanchard
[snip] [snip] ?php function solution1($var1){ // some code } function solution2($var2){ // some code } function solution3($var3){ // some code } if ($function == 'solution1' or $function == 'solution2' or $function == 'solution3') { $my_solution = $function($var); #

Re: [PHP] problem calling functions

2007-10-19 Thread Robin Vickery
On 19/10/2007, afan pasalic [EMAIL PROTECTED] wrote: hi I have a problem with calling functions: ?php function solution1($var1){ // some code } function solution2($var2){ // some code } function solution3($var3){ // some code } if ($function == 'solution1'

Re: [PHP] problem calling functions

2007-10-19 Thread afan pasalic
Stut wrote: afan pasalic wrote: why then the code doesn't work? the error I'm getting is: Fatal error: Call to undefined function solution1() in ... even the function itself is just above the line that calls function? I can only guess that you're not showing us the code you're actually

RE: [PHP] problem calling functions

2007-10-19 Thread Jay Blanchard
[snip] ?php function solution1($var1){ // some code } function solution2($var2){ // some code } function solution3($var3){ // some code } if ($function == 'solution1' or $function == 'solution2' or $function == 'solution3') { $my_solution = $function($var); # this

Re: [PHP] problem calling functions

2007-10-19 Thread Zoltán Németh
2007. 10. 19, péntek keltezéssel 11.15-kor afan pasalic ezt írta: hi I have a problem with calling functions: ?php function solution1($var1){ // some code } function solution2($var2){ // some code } function solution3($var3){ // some code } if

[PHP] problem calling functions

2007-10-19 Thread afan pasalic
hi I have a problem with calling functions: ?php function solution1($var1){ // some code } function solution2($var2){ // some code } function solution3($var3){ // some code } if ($function == 'solution1' or $function == 'solution2' or $function == 'solution3') {

Re: [PHP] problem calling functions

2007-10-19 Thread afan pasalic
Jay Blanchard wrote: [snip] ?php function solution1($var1){ // some code } function solution2($var2){ // some code } function solution3($var3){ // some code } if ($function == 'solution1' or $function == 'solution2' or $function == 'solution3') {

Re: [PHP] problem calling functions

2007-10-19 Thread Stut
afan pasalic wrote: why then the code doesn't work? the error I'm getting is: Fatal error: Call to undefined function solution1() in ... even the function itself is just above the line that calls function? I can only guess that you're not showing us the code you're actually running. See the

Re: [PHP] problem calling functions

2007-10-19 Thread afan pasalic
actually, what example you are talking about? I got jay's example only? Stut wrote: afan pasalic wrote: why then the code doesn't work? the error I'm getting is: Fatal error: Call to undefined function solution1() in ... even the function itself is just above the line that calls function?