Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Help with php. How to call a function.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Tue Feb 09, 2010 7:46 am    Post subject: Help with php. How to call a function. Reply with quote

I don't know how to call a function.

I haz a IO class that has a function that takes no argument and returns an array of files.

Now how would I manage to call the function?

Code:
class jihad
{
   function DoStuff
   {
      // do the magic stuff with $Names;
      return $Names;
   }
}


Code:

  $test = new jihad();
  $Names = $test->DoStuff();

_________________
Intel over amd yes.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
pedropmp
Cheater
Reputation: 0

Joined: 17 Jan 2010
Posts: 27

PostPosted: Tue Feb 09, 2010 8:15 am    Post subject: Re: Help with php. How to call a function. Reply with quote

JesusLovesQlimax wrote:
I don't know how to call a function.

I haz a IO class that has a function that takes no argument and returns an array of files.

Now how would I manage to call the function?

Code:
class jihad
{
   function DoStuff
   {
      // do the magic stuff with $Names;
      return $Names;
   }
}


Code:

  $test = new jihad();
  $Names = $test->DoStuff();


the function code is wrong, do it like this:

Code:
class jihad
{
   function DoStuff(){
      // do the magic stuff with $Names;
      return $Names;
   }
}


You must always add the '()' in a function, even if no parameters are needed.

_________________
Hey Hitler Rep+ if I was helpful
Back to top
View user's profile Send private message
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Tue Feb 09, 2010 8:54 am    Post subject: Reply with quote

that was just some sample code Razz Actually I didn't test my code before posting which I should have cuz it worked.
_________________
Intel over amd yes.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
pedropmp
Cheater
Reputation: 0

Joined: 17 Jan 2010
Posts: 27

PostPosted: Tue Feb 09, 2010 5:35 pm    Post subject: Reply with quote

lol ok.

Basics of PHP (with pcitures):
http://inpics.net/phpbasics.html

and what you want is here:
http://inpics.net/tutorials/php/subs2.html

_________________
Hey Hitler Rep+ if I was helpful
Back to top
View user's profile Send private message
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Wed Feb 10, 2010 10:24 am    Post subject: Reply with quote

Lol no. What I wanted wasn't there so don't post crap. It was easy so u can stop posting.
_________________
Intel over amd yes.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites