Jump to content

Half a function


Azu

Recommended Posts

How can I make a half function half variable, so that, like, I set it to the PHP code I want it to use, and put in my code like a function, except that all of the variables stuff act like I am just putting in the code, so that I don't have to declare all of the variables as global and stuff like that?

 

Please tell me how I can do this I'd really appreciate it ^_^

Basically I just want to cut down on my code size so that I don't have to copy and paste the same piece of code over and over, instead of making it into a function which messes with the way variables work and stuff.. thanks!

Link to comment
https://forums.phpfreaks.com/topic/45798-half-a-function/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.