Tuesday, April 19, 2011
Monday, April 18, 2011
PHP Functions with optional arguments - example
function foo($arg1 = '', $arg2 = '') {
echo "text1: $arg1\n";
echo "text2: $arg2\n";
}
foo('hello','world');
/* prints:
text1: hello
text2: world
*/
foo();
/* prints:
text1:
text2:
*/
echo "text1: $arg1\n";
echo "text2: $arg2\n";
}
foo('hello','world');
/* prints:
text1: hello
text2: world
*/
foo();
/* prints:
text1:
text2:
*/
Thursday, April 7, 2011
Wednesday, April 6, 2011
Subscribe to:
Posts (Atom)