On Nov 21, 2010, at 4:57 PM, Tamara Temple wrote:
On Nov 20, 2010, at 5:31 PM, Jason Pruim wrote:
?PHP
function ddbYear($name, $message, $_POST, $option){
Maybe it's just me, but using the name of a global as a function
parameter just seems like a bad idea. Yes, you can do it. Should
On Nov 20, 2010, at 5:31 PM, Jason Pruim wrote:
?PHP
function ddbYear($name, $message, $_POST, $option){
Maybe it's just me, but using the name of a global as a function
parameter just seems like a bad idea. Yes, you can do it. Should you?
I think not. Especially, as, you are passing
Hey Everyone!
So I came across a problem that I don't know how to fix... I have
searched and thought and just not having anything click as to where I
am messing up...
I have a few functions as follows:
?PHP
function ddbYear($name, $message, $_POST, $option){
//Make sure to post form
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 ==
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
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:
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,
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
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
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')
{
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
[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); #
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
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
[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
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
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
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')
{
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
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?
Hi,
I keep getting errors in my script that says 'x' function is undefined or
'y' function is undefined. I defined it as 'function test ($a, $b)' and call
it using 'test($a, $b)' From my knowledge this is correct, but it just
simply doesn't work.
Anyone have any ideas on this?
TIA
--
PHP
Please show a bit more of the actual code
- Original Message -
From: Beauford.2002 [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Friday, December 20, 2002 9:55 AM
Subject: [PHP] Problem with functions
Hi,
I keep getting errors in my script that says 'x' function
Hi,
I keep getting errors in my script that says 'x' function
is undefined or 'y' function is undefined. I defined it as
'function test ($a, $b)' and call it using 'test($a, $b)'
You need to post code :-)
Try this:
?php
function test ($a, $b)
{
echo I am the test functionbr /;
($date, $name, $email, $comment) {
code ...;
}
duplicatemessage() {
code ...;
}
?
- Original Message -
From: Jon Haworth [EMAIL PROTECTED]
To: 'Beauford.2002' [EMAIL PROTECTED]; PHP General
[EMAIL PROTECTED]
Sent: Friday, December 20, 2002 11:05 AM
Subject: RE: [PHP] Problem
On Saturday 21 December 2002 03:27, Beauford.2002 wrote:
Jon,
You may have answered my question, but I'm still confused. I see from your
example that the actual function comes before the function is called in the
script, and when I changed mine to that format it worked.
Now the confusion. I
: [EMAIL PROTECTED]
Asunto: [PHP] Problem with functions
Hi,
I have de following code for example
?php
$username = victor;
function test() {
echo $username;
}
?
If I call the funcion test(), echo print nothing what's is going on ?
[]´s
[EMAIL PROTECTED
Hi,
I have de following code for example
?php
$username = victor;
function test() {
echo $username;
}
?
If I call the funcion test(), echo print nothing what's is going on ?
[]´s
[EMAIL PROTECTED]
__ Victor
Halla
Hi,
Thursday, December 5, 2002, 9:15:53 AM, you wrote:
VH Hi,
VH I have de following code for example
VH ?php
VH $username = victor;
VH function test() {
VH echo $username;
VH }
?
VH If I call the funcion test(), echo print nothing what's is going on ?
VH []´s
VH [EMAIL
Thanks !!!
Victor
Tom Rogers [EMAIL PROTECTED] escreveu na mensagem
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi,
Thursday, December 5, 2002, 9:15:53 AM, you wrote:
VH Hi,
VH I have de following code for example
VH ?php
VH $username = victor;
VH function test() {
VH echo
29 matches
Mail list logo