<?php $fruits = array('apple', 'orange', 'apple'); $str = serialize($fruits); echo "$str\n"; $new_fruits = unserialize($str); $new_fruits[] = 'apple'; print_r($new_fruits); ?>