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: > >> > >> >> function solution1($var1){ > >> // some code > >> } > >> > >> function solutio

RE: [PHP] problem calling functions

2007-10-19 Thread Zoltán Németh
2007. 10. 19, péntek keltezéssel 11.33-kor Jay Blanchard ezt írta: > [snip] > 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-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 unsubscri

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 solu

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 f

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 a

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
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 cal

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: http://www.php.net/un

Re: [PHP] problem calling functions

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

Re: [PHP] problem calling functions

2007-10-19 Thread afan pasalic
Jay Blanchard wrote: > [snip] > 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: >> >> > function solution1($var1){ >> // some code >> } >> >> function solution2($var2){ >> // some code >> } >> >> function solution3($var3){ >

RE: [PHP] problem calling functions

2007-10-19 Thread Jay Blanchard
[snip] [snip] [/snip] I don't think you can put a function name in a variable and call it like $function($var). You'd be better of with a case statement in one function and call the proper solution (quick syntax, may need a little fixing; function my_solution($function, $var){ switch $f

RE: [PHP] problem calling functions

2007-10-19 Thread Jay Blanchard
[snip] [/snip] I don't think you can put a function name in a variable and call it like $function($var). You'd be better of with a case statement in one function and call the proper solution (quick syntax, may need a little fixing; function my_solution($function, $var){ switch $function{

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: > > function solution1($var1){ > // some code > } > > function solution2($var2){ > // some code > } > > function solution3($var3){ > // some code > } > > if

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: > > function solution1($var1){ > // some code > } > > function solution2($var2){ > // some code > } > > function solution3($var3){ > // some code > } > > if ($function ==

[PHP] problem calling functions

2007-10-19 Thread afan pasalic
hi I have a problem with calling functions: suggestions? thanks. -afan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php