Skip to main content

If you pass an array to the update_option it will automatically serialize it. you can later retrieve them back into an array like this.

$tempoptions = get_option("plugin-options"); if (!empty($tempoptions)) { foreach ($tempoptions as $key => $option) $options[$key] = $option; }

$tempoptions = get_option("plugin-options");
if (!empty($tempoptions)) {
    foreach ($tempoptions as $key => $option)
        $options[$key] = $option;
}

then do something like var_dump ($options$options) this will show you the entire array.

I think they use the maybe_serialize/maybe_unserialize/is_serialized functions from the codex, but I never really looked into it. Just found them now. http://codex.wordpress.org/Function_Reference/maybe_serialize

If you pass an array to the update_option it will automatically serialize it. you can later retrieve them back into an array like this.

$tempoptions = get_option("plugin-options"); if (!empty($tempoptions)) { foreach ($tempoptions as $key => $option) $options[$key] = $option; }

then do something like var_dump ($options) this will show you the entire array.

I think they use the maybe_serialize/maybe_unserialize/is_serialized functions from the codex, but I never really looked into it. Just found them now. http://codex.wordpress.org/Function_Reference/maybe_serialize

If you pass an array to the update_option it will automatically serialize it. you can later retrieve them back into an array like this.

$tempoptions = get_option("plugin-options");
if (!empty($tempoptions)) {
    foreach ($tempoptions as $key => $option)
        $options[$key] = $option;
}

then do something like var_dump ($options) this will show you the entire array.

I think they use the maybe_serialize/maybe_unserialize/is_serialized functions from the codex, but I never really looked into it. Just found them now. http://codex.wordpress.org/Function_Reference/maybe_serialize

added 34 characters in body
Source Link
Patriek
  • 457
  • 3
  • 8

If you pass an array to the update_option it will automatically serialize it. you can later retrieve them back into an array like this.

$tempoptions = get_option("plugin-options");
if (!empty($tempoptions)) {
    foreach ($tempoptions as $key => $option)
        $options[$key] = $option;
}

$tempoptions = get_option("plugin-options"); if (!empty($tempoptions)) { foreach ($tempoptions as $key => $option) $options[$key] = $option; }

then do something like echovar_dump $options['title']($options) this will show you the entire array.

I think they use the maybe_serialize/maybe_unserialize/is_serialized functions from the codex, but I never really looked into it. Just found them now. http://codex.wordpress.org/Function_Reference/maybe_serialize

If you pass an array to the update_option it will automatically serialize it. you can later retrieve them back into an array like this.

$tempoptions = get_option("plugin-options");
if (!empty($tempoptions)) {
    foreach ($tempoptions as $key => $option)
        $options[$key] = $option;
}

then do something like echo $options['title']

I think they use the maybe_serialize/maybe_unserialize/is_serialized functions from the codex, but I never really looked into it. Just found them now. http://codex.wordpress.org/Function_Reference/maybe_serialize

If you pass an array to the update_option it will automatically serialize it. you can later retrieve them back into an array like this.

$tempoptions = get_option("plugin-options"); if (!empty($tempoptions)) { foreach ($tempoptions as $key => $option) $options[$key] = $option; }

then do something like var_dump ($options) this will show you the entire array.

I think they use the maybe_serialize/maybe_unserialize/is_serialized functions from the codex, but I never really looked into it. Just found them now. http://codex.wordpress.org/Function_Reference/maybe_serialize

fixed code markup
Source Link
Rarst
  • 99.9k
  • 10
  • 160
  • 298

If you pass an array to the update_option it will automatically serialize it. you can later retrieve them back into an array like this.

$tempoptions = get_option("plugin-options"); if (!empty($tempoptions)) { foreach ($tempoptions as $key => $option) $options[$key] = $option; }

$tempoptions = get_option("plugin-options");
if (!empty($tempoptions)) {
    foreach ($tempoptions as $key => $option)
        $options[$key] = $option;
}

then do something like echo $options['title']$options['title']

I think they use the maybe_serialize/maybe_unserialize/is_serialized functions from the codex, but I never really looked into it. Just found them now. http://codex.wordpress.org/Function_Reference/maybe_serialize

If you pass an array to the update_option it will automatically serialize it. you can later retrieve them back into an array like this.

$tempoptions = get_option("plugin-options"); if (!empty($tempoptions)) { foreach ($tempoptions as $key => $option) $options[$key] = $option; }

then do something like echo $options['title']

I think they use the maybe_serialize/maybe_unserialize/is_serialized functions from the codex, but I never really looked into it. Just found them now. http://codex.wordpress.org/Function_Reference/maybe_serialize

If you pass an array to the update_option it will automatically serialize it. you can later retrieve them back into an array like this.

$tempoptions = get_option("plugin-options");
if (!empty($tempoptions)) {
    foreach ($tempoptions as $key => $option)
        $options[$key] = $option;
}

then do something like echo $options['title']

I think they use the maybe_serialize/maybe_unserialize/is_serialized functions from the codex, but I never really looked into it. Just found them now. http://codex.wordpress.org/Function_Reference/maybe_serialize

Source Link
Patriek
  • 457
  • 3
  • 8
Loading