sorry for any mistake i am beginner on php i got this value and want split the usa address from the code
Service Address
GERTRUDE HAGAMAN
2608 N LAKEVIEW DR
HAMMONTON, NJ 08037-3501
Manage XFINITY WiFi
Manage Xfinity wifi home hotspot setting
i need extract to be
$name : GERTRUDE HAGAMAN
$address : 2608 N LAKEVIEW DR
$city : HAMMONTON
$state : NJ
$zipcode : 08037-3501
so is there any advice
<?php
preg_match('/service address
*(.*)
*(.*)
((.*?),\s+(\w{2})\s+(.*))
*manage xfinity wifi/i', $full_address, $match);
$name = $match[1];
$address = $match[2];
$city = $match[4];
$state = $match[5];
$zip = $match[6];
?>
this will only work if the address format is similar to what you have posted above