<?php $o = array(1,2,3,4,5); $ha =fopen("1.txt", 'rb'); $a = serialize($o); fwrite ($ha,"$a"); fclose($ha); ?>