[wp-hackers] Quick dumb question about get_option

Francesco Terenzani f.terenzani at gmail.com
Wed Mar 14 17:08:26 GMT 2007


> 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.
>
> Thanks for the responses,
> -drmike

get_option should returns the data type saved using update_option.

For example:

update_option('a_name', array(1, 2));

update_option('an_other_name', 'a string');

get_option('a_name') will returns an array

get_option('an_other_name') will returns a string


More information about the wp-hackers mailing list