Good evening people,
I am new here, so I apologise in advance, I am learning all I can as quickly as I can, however here is the problem im facing; my site is echoing the postcode for a customer in a different section, which is what I want, however, I only want the first section, for example; DN110NB would be DN11
I did instead of echo $pcode i did; echo substr($pcode, 0, 4)
however I now face the issue if someone is in DN59HH, its echoing DN59 not DN5
I have found a table of postcodes online, is it possible to match these up in anyway so it only displays the first part of a postcode?
Your help is greatly appreciated.
Kind regards
Alex