PHP Tutorial : Writing your own custom functions
Feb 19, 2009 Basic PHP
Errrr,
I dont know which hello word to say for this post to keep the “unique” style so will start explaining how you can do it. Firstly, you have red about a lot of “ready made” php functions which comes with the language. Now it’s time to create your own functions with your own name (must be different than existent funtions, start with a char not a number, etc etc). How you do it? Simple, by declaring its name, Look:
<?php function myFirstOne() { print "what to do?"; } //and appeal it - will show the message myFirstOne(); ?>
Tags: custom functions, php custom functions, php existent functions, php functions, php functions name, php own functions


Leave a Reply