Php

From Wiki2
Revision as of 13:47, 15 January 2013 by Tim (talk | contribs)

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>

PHP questions