[php]What are these bits of code?

I'm just reading through some code and wondered if you guys can tell me what some things do?

1.
PHP Code:
srand((double)microtime()*1000000); 
2.
Now this bit is incomplete but maybe you can help explain what it is doing.
PHP Code:
    if( strlen($userform->fields["passwd1"]->value) <= 
3.
LOL. getting bigger now.
PHP Code:
    $ret db_query"select email from {$config["prefix"]}_users where"
        
." email='".addslashes($userform->fields["email"]->value)."'" ) or die(db_error());
    if( 
db_fetch_row($ret) ) {
        
$error .= $lang["MYACCT_INS_ERROR_06"]." <a href=\"mailto:".$cfg["core"]["mail_admin"]."\">".$cfg["core"]["name_admin"]."</a>.<br>";
    }
    
db_free_result($ret); 
This is a section of the code. Could someone help explain the who database queiring and what its doing?


4.
PHP Code:
if( strlen($error) > 
5.
PHP Code:
$stmt sprintf 
What is the sprintf function?


If someone could help me in my php newbieness I would be extremely grateful. [php]What are these bits of code?

 

 

 

 

Top