Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $x = 'a:1:{s:10:"guest_name"";s:10:""Kelly Gallagher"";}"';
- $x = preg_replace('/s:([1-9][0-9]*):""/', 's:${1}:"', $x);
- $x = preg_replace('/(\w)"";/', '${1}";', $x);
- $x = preg_replace('/"$/', '', $x);
- echo "$x\n";
Add Comment
Please, Sign In to add comment