Created
October 3, 2023 20:47
-
-
Save UltimateByte/cf6ba0e44328ea1ef20899647cc091e6 to your computer and use it in GitHub Desktop.
Unserialize Data (WordPress)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Your serialized data | |
$option_value = 'a:100:[...]'; | |
$data = unserialize($option_value); | |
// Data to replace directly within variable | |
$data['footer_text'] = '<a href="https://www.lrob.fr">Webmaster lrob.fr</a>'; | |
// We serilize data back | |
$new_option_value = serialize($data); | |
// And output for later use (phpMyAdmin or else) | |
echo "new serialized data: " . $new_option_value . "\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment