Function calls 101

From: Date: Thu, 06 Jul 2000 15:01:14 +0000
Subject: Function calls 101
Groups: php.general 
Request: Send a blank email to php-general+get-5221@lists.php.net to get a copy of this message
Ok I am making this program so that I dont have to type 40 pages of code with all the same stuff but with different values for each thing. I am planing on instead writing the 40 pages, but instead of typing out everthing just write a php3 progam that calls a function and passes values into this function from a common file. This will be done using the require ("something"); command and then calling the function afterwords. Right now I am testing the function. I have a call to the function inside of the file I am going to use the require () function on. When I run it I get an invalid function call. Now I have checked it about 20 times to make sure it is spelled right and everything else but it just doesnt want to call that function. This is the error it gives me Fatal error: Call to unsupported or undefined function displaytable() in http://mypage.com line 6 The function call inside the program looks like this... <?php DisplayTable ("Sandwich","5.9","167","290","24","48","9","14","80","27","2","10","50","17","29","10","0","8","0","0","10","870","36","1","4"); function DisplayTable ($Item, $Servoz, $Serveg, $Cal, $Prog, $Prodv, Fatg, $fatdv, $CFatc, $CFatp, $SFatg, $SFatdv, $Cholmg, $Choldv, $Carbg, $Carbdv, $Sugg, $VA, $VC, $Ca, $Ir, $Sodmg, $Soddv, $Fbg, $Fbdv) { ... This is where the function stuff is ...... } ?> If you could help me out with this that would be great. I have also tried testing this with the require () statement and it didn't work either but I am thinking it is the same problem. Yes I know this is kinda of newbie question and I know the answer is going to be easy but I am frustrated right now. :) Thanks, nashirak

« previous php.general (#5221) next »