Microsoft
Software
Hardware
Network
Question : php str_replace question
The output of the array ['location'] is always state, city and zip:
<?=niceLabel(str_replace('
,', ', ', $listing['location']), false)?>
So the output of the code above is:
North Jackson, OH 44451
What I would like to do is to remove City and State so the only output will be the Zip Code only:
44451
Answer : php str_replace question
Assuming that the zipcode is always 5 numbers long, and preceeded by a space, this works:
$string="Anywhere, OH 12345";
$zip = substr($string,strrpos($st
ring," ")+1,5);
echo $zip;
Random Solutions
DPM 2010 - Agent Install Problem (On 2k3 DC)
Delphi & TWebBrowser issue ???
How to Combine The Data in Two Excel Sheet into One Using VBA
Raid 1 Rebuild Failed - Adaptec 1210SA
Unable to assign a resource to meeting in Outlook 2010
Change Username on SBS2008
Exchange 2010. Install Failed, now can't uninstall
Perl - Read Excel rows into an array
Move DC role from Exchange Server
Sync iPhone w/Outlook without iTunes or Exchange