PHP Multi Dimensional Array : Phone Prefix vs Courier Name
<p>I'm thinking to use Array to store this tiny data instead using Database. But, I have difficulties to 'call' the data since this is Multi Dimensional Array.</p>

<p>Here's my situation :</p>

<ol>
<li>I have several phone prefix from different cities :</li>
</ol>

<blockquote>
<pre><code>$CityA = array("021","031","041","051");

$CityB = array("011","012","013","014");

$CityC = array("111","112","113","114");
</code></pre>
</blockquote>

<ol>
<li>Also, I have several courier for those cities :</li>
</ol>

<blockquote>
<pre><code>$CityA = array("FedEx", "TNT", "DHL");

$CityB = array("YYY Cargo", "USPS");

$CityC = array("UPS", "Regular Mail", "XXX Cargo");
</code></pre>
</blockquote>

<p>what I need is :</p>

<blockquote>
  <p>INPUT : Phone Prefix, for example 021</p>
  
  <p>OUTPUT : FedEx, TNT or DHL >> Randomly selected</p>
</blockquote>

<p>here's another examples :</p>

<blockquote>
  <p>012 >> YYY Cargo (Randomly selected from "YYY Cargo", "USPS")</p>
  
  <p>112 >> UPS</p>
  
  <p>etc.</p>
</blockquote>

<p>It's pretty easy with MySQL, but I want to reduce database connection by using Array. how to do this?</p>
