If you mean you have stored some page code in a MySQL field; in that data, there is PHP code; and you want that data to be evaluated as PHP code, you just call eval().
You can use json : it handles encoding/decoding variables.
If you have a big object like $object, insert into mysql json_encode($object) and later you’ll be able to retrieve it by using $object=json_decode($data)
where $data is the correct mysql field