$ii2){ $$ii = $ii2; } echo '{"ip":"'.$ip.'","pro":"'.$pro.'","city":"'.$city.'","addr":"'.trim($addr).'"}';