Difference between revisions of "Php"
From Wiki2
Line 1: | Line 1: | ||
==bits of code I always forget== | ==bits of code I always forget== | ||
===[http://www.webmaster-source.com/2009/08/20/php-stdclass-storing-data-object-instead-array/ stdclass-storing-data-object-instead-array]=== | |||
===reading command line arguments=== | ===reading command line arguments=== | ||
<syntaxhighlight> | <syntaxhighlight> |
Revision as of 13:47, 15 January 2013
bits of code I always forget
stdclass-storing-data-object-instead-array
reading command line arguments
<syntaxhighlight> <?php echo count($argv); if (count($argv)<2){ //if no command line argument echo("script requires command line argument with name of db to backup"); exit(); } $db = $argv[1]; ?> </syntaxhighlight>