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
How can I determine from an Office 2010 Volume License key (or product activation key) exactly which version of Office 2010 to download & install from MSDN (msdn.microsoft.com)?
Excel - VBA text formatting
Excel addins
Windows 2008 R2 RDS User redirection
SQL2005 View being forced to Encrypted
ZyXel GS-1548 switch
WCF Nested complex types
Exchange Server mail delay.
Show All Records In Query if Nothing Selected in Listbox
Exporting from SQL Server 2005 Table to Flat file with UTF-8 Problem.