First, how to check the variable content php4 has a var_dump ($ var) function, used to Dump one variable content (various types of variables), just the output of this function is not suitable in the HTML page. You can write a function yourself as follows: Function Dump ($ var) {echo "
/ n"; var_dump ($ var); echo " pre> / n";} is very suitable for debugging! In PHP3, you can only use the recursive method DUMP out of an Array content, and it is powerless for Object. It seems that the last Dump_Array function is such a function. :) Second, static variables Function test () {static $ s_val; $ s_val = 2; return test (); // 2 echo test (); // 4?> Three, avoid the same celebrity A method of multiple times # ---------------- Avoid The Same Name ------------- for ($ Checkname = 0; $ Checkname <$ Num; $ Checkname {IF ($ Name [$ Checkname] == $ Name [$ Num]) {$ Num--; Break;}} 4, get a file extension is used to use this small function: Function FileExtName ($ fileEname) {$ RETVAL = ""; $ Pt = Strpos ($ filename, "."); if ($ pt) $ RETVAL = Substr ($ FileName, $ PT 1, Strlen ($ filename) - $ PT); Return ($ RETVAL);}