這個方法可以用來將陣列以String型態存入MySQL中,取出可還原為陣列

程式碼
	<?php
	//原始陣列
	$arr = array('測試','123','ABC','eee');
	//編碼(陣列->字串)
	$en = base64_encode(serialize($arr));
	//解開(字串->陣列)
	$de = unserialize(base64_decode($en));
	print_r($de);
	?>
	

酷米 © All Rights Reserved.

loading
Loading...