[wp-hackers] Quick dumb question about get_option

Knut-Olav Hoven hovenko at linpro.no
Wed Mar 14 14:53:18 GMT 2007


On Wednesday 14 March 2007 15:38, Dr. Mike Wendell wrote:
> Hmm, that's strange because what's being passed out of get_option in
> this case is not an array. I put in a lay to print out the variable.
> Sometimes it tell me 'Array', some times it doesn't.  Rather annoying.

Are you sure the option is stored in the database? If get_option cant find the 
value for the given key, it returns either an empty string or null (cant 
remember which).

You can test it with an if-statement.

Btw, to print the content of an array, say when debugging, use 
print_r($your_array);


-- 
Knut-Olav Hoven
Systemutvikler               mob: +47 986 71 700
Linpro AS                    http://www.linpro.no/


More information about the wp-hackers mailing list