<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1827127654792639979</id><updated>2024-09-06T18:52:54.710-07:00</updated><category term="010 to 0100"/><category term="012 to 0122"/><category term="014 to 0111"/><category term="database"/><category term="egypt mobile numbers fix"/><category term="egypt mobile numbers update"/><category term="etisalat"/><category term="mobile fix"/><category term="mobinil"/><category term="mysql"/><category term="php"/><category term="vodafone"/><title type='text'>Egypt Mobile numbers update fix</title><subtitle type='html'>Solution for anyone having problems with changing Egyptian mobile phone numbers in database.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://egyptmobilenumberfix.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1827127654792639979/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://egyptmobilenumberfix.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06723571957174067834</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1827127654792639979.post-4344049332100301084</id><published>2012-02-17T09:30:00.001-08:00</published><updated>2012-02-17T10:41:00.974-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="010 to 0100"/><category scheme="http://www.blogger.com/atom/ns#" term="012 to 0122"/><category scheme="http://www.blogger.com/atom/ns#" term="014 to 0111"/><category scheme="http://www.blogger.com/atom/ns#" term="database"/><category scheme="http://www.blogger.com/atom/ns#" term="egypt mobile numbers fix"/><category scheme="http://www.blogger.com/atom/ns#" term="egypt mobile numbers update"/><category scheme="http://www.blogger.com/atom/ns#" term="etisalat"/><category scheme="http://www.blogger.com/atom/ns#" term="mobile fix"/><category scheme="http://www.blogger.com/atom/ns#" term="mobinil"/><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><category scheme="http://www.blogger.com/atom/ns#" term="php"/><category scheme="http://www.blogger.com/atom/ns#" term="vodafone"/><title type='text'>egypt mobile number database fix</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 15px; text-align: -webkit-auto;&quot;&gt;“Egyptian mobile phone numbers have all changed on Thursday October
6&lt;/span&gt;&lt;sup style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; text-align: -webkit-auto;&quot;&gt;th&lt;/sup&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 15px; text-align: -webkit-auto;&quot;&gt;, 2011 as part of a state drive to meet increased user
demand”, the National Telecom Regulatory Authority has announced.&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-size: 15px; text-align: -webkit-auto;&quot;&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
The changes mean every Egyptian mobile phone number will now be 11
digits in length.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
Amendments are now different for each of Egypt&#39;s three mobile
operators:&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;background-color: #38761d; color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style=&quot;background-color: #38761d; color: white;&quot;&gt;Etisala&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style=&quot;background-color: #38761d; color: white;&quot;&gt;t&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
Current 10 digit numbers, which all start with 01, will take an extra
1. They will now begin with 011&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
Current 11 digit numbers, which all start with 0152, will change the
5 to a 1. They will now begin with 0112&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;background-color: orange; color: white;&quot;&gt;&amp;nbsp;Mobinil&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
Current 10 digit numbers, which start with 01, will add a 2. They
will now begin with 012&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
Current 11 digit numbers, which start with 0150, will replace the 5
with a 2. They will begin with 0120&lt;/div&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;background-color: red; color: white;&quot;&gt;&amp;nbsp;Vodafone&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
Current 10 digit numbers, which start with 01, will add a 0. They
will now start with 010&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
Current 11 digit numbers, which start with 0151, will replace 5 with
0. They will start with 0101&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
Mobile operators will have four months to fully comply with the
decision, during which time users will be able to call using either
the old number or the amended one.&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;The following post
can help you update your database with php. It edits numbers starting
with +201XXXXXXXX that counts 12 and 01XXXXXXXX that counts 10 and it
does handle +2015xxxxxxxx that counts 13 and 015xxxxxxxx that counts
11.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;It does not mess
with already updated numbers.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;It only works on
the pattern which means:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;(&quot;it does not
repair a number that is less or more than 10 characters and starts
with 01&quot;,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&quot;and it does
not repair a number that is less or more than 12 characters and
starts with+201&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;then it sets every
11 character phone number that starts with 01XXXXXXXXX to
+201XXXXXXXXX&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;You can change it
to 00201XXXXXXXXX by setting the variable $format=true;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;b&gt;*****************************&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #333333;&quot;&gt;* &amp;nbsp; &amp;nbsp;
&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;HOW TO USE &amp;nbsp;THE FILE &lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;*&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;b&gt;*****************************&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;*********************************************************&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;1- Before using,
please export &amp;amp; backup your table; for your own Data safety.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;2- Make sure that
the mobile field in your database supports at least 14 characters.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;2- Add this file
to your web server.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;3- Modify the
variables at the beginning of the file according to your case.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;b&gt;To
set:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table cellpadding=&quot;4&quot; cellspacing=&quot;0&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; width: 378px;&quot;&gt;
 &lt;colgroup&gt;&lt;col width=&quot;181&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;179&quot;&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: 1px solid #000000; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in; padding-top: 0.04in;&quot; width=&quot;181&quot;&gt;&lt;div align=&quot;CENTER&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: black;&quot;&gt;To Set&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: 1px solid #000000; padding: 0.04in;&quot; width=&quot;179&quot;&gt;&lt;div align=&quot;CENTER&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: black;&quot;&gt;Modify&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in; padding-top: 0in;&quot; width=&quot;181&quot;&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;Connection
   file &lt;/span&gt;&lt;/span&gt;
   &lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0.04in; padding-top: 0in;&quot; width=&quot;179&quot;&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;$dbconn
   value.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in; padding-top: 0in;&quot; width=&quot;181&quot;&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;table
   name&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0.04in; padding-top: 0in;&quot; width=&quot;179&quot;&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;$tb
   value&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in; padding-top: 0in;&quot; width=&quot;181&quot;&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;id
   column name&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0.04in; padding-top: 0in;&quot; width=&quot;179&quot;&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;$id
   value&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in; padding-top: 0in;&quot; width=&quot;181&quot;&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;mobile
   column name&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0.04in; padding-top: 0in;&quot; width=&quot;179&quot;&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;$mobile
   value&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in; padding-top: 0in;&quot; width=&quot;181&quot;&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;final format
   &#39;00201XXXXXXXXX&#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0.04in; padding-top: 0in;&quot; width=&quot;179&quot;&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;$format=true&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr valign=&quot;TOP&quot;&gt;
  &lt;td style=&quot;border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: none; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in; padding-top: 0in;&quot; width=&quot;181&quot;&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;final format
   &#39;+201XXXXXXXXX&#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: none; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0.04in; padding-top: 0in;&quot; width=&quot;179&quot;&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;$format=false&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;If you need to
revise, a file is exported to the&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;named
egyptmobilefix.txt to the directory of this file.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;**************************************&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;default
format&#39;+201XXXXXXXXX&#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;to set final
format &#39;00201XXXXXXXXX&#39; set variable $format=true;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;to set final
format &#39;+201XXXXXXXXX&#39; set variable $format=false;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; margin-bottom: 0in;&quot;&gt;
&lt;div style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black; font-family: inherit;&quot;&gt;Developed by:
Mostafa El-Bakly&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black; font-family: inherit;&quot;&gt;Alexandria, Egypt&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black; font-family: inherit;&quot;&gt;You can contact me
if you need any help&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black; font-family: inherit;&quot;&gt;&lt;b&gt;&lt;i&gt;elbakly&lt;/i&gt;&lt;/b&gt;
is my username at gmail.&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;a href=&quot;http://mrandmrsbakly.com/fixmobiles.zip&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;b&gt;Download
the file from this link here&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #990000;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;b&gt;or&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ol style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;li&gt;&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #990000;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;b&gt;Copy
 and paste the following to your notepad, and save it as
 fixmobiles.php.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #990000;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;b&gt;Edit your
 variables to match your settings.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #990000;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;b&gt;Backup your
 database table.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #990000;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;b&gt;Upload the
 file to your server and run it.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&amp;lt;?php&lt;br /&gt;
/* comments and how to use developer details at the end of the php tag */&lt;br /&gt;
// please set your variables&lt;br /&gt;
&lt;br /&gt;
//connection file name;&lt;br /&gt;
$dbconn=&quot;dbcon.php&quot;;&lt;br /&gt;
//table name&lt;br /&gt;
$tb=&#39;clients&#39;;&lt;br /&gt;
//id coloum name&lt;br /&gt;
$id=&#39;id&#39;;&lt;br /&gt;
//mobile coloum name&lt;br /&gt;
$mobile=&#39;mobile&#39;;&lt;br /&gt;
//format variable read line 40&lt;br /&gt;
$format=false;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
include($dbconn);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mysql_query(&quot;UPDATE &quot;.$tb.&quot; SET &amp;nbsp; &amp;nbsp;&quot;.$mobile.&quot; = replace(&quot;.$mobile.&quot;, &#39;00&#39;, &#39;+&#39;) WHERE &amp;nbsp;&quot;.$mobile.&quot; LIKE &#39;00%&#39;;&quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$q=mysql_query(&quot;select * from &quot;.$tb);&lt;br /&gt;
$filecontent=&#39;&#39;;&lt;br /&gt;
echo &quot;&amp;lt;ul&amp;gt;&quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;while($fq=mysql_fetch_assoc($q)){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;$mob=NULL;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;//getting mobile numbers&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$m=$fq[&#39;mobile&#39;];&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$nlen=strlen($m);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;//finding the first 2 numbers&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$m1=substr($m,0,2);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;//making them all start with +201&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;if($m1==&#39;+2&#39;&amp;amp;&amp;amp;$nlen==12){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;$m1=&quot;+2&quot;.&#39;01&#39;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;$mr=substr($m,4);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;$mx=substr($m,2);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;$mob=$m1.$mr;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;$mlen=strlen($mob);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;if($nlen==13){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;if(substr($m,0,5)==&#39;+2015&#39;){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;$m1=&#39;+201&#39;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;$mr=substr($m,4);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;$mob=$m1.$mr;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;if($m1==&#39;01&#39; &amp;amp;&amp;amp; $nlen==10){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;$m1=&quot;+2&quot;.&#39;01&#39;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;$mr=substr($m,2);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;$mob=$m1.$mr;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;$mlen=strlen($mob);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;if($nlen==11){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;if(substr($m,0,3)==&#39;015&#39;){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;echo substr($m,0,3).&quot;|&quot;.$m.&quot;&amp;lt;br/&amp;gt;&quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;$m1=&#39;+201&#39;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;$mr=substr($m,2);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;$mob=$m1.$mr;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;$error=&#39;&#39;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;if($mlen!=12){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;$error=&quot;PLEASE check the original is &quot;.$m.&quot; (&quot;. $nlen.&quot;) count is &quot;.$mlen.&quot; of &quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;if($mob){&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;$nm=substr($m1,0,2);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;if($nm!=&#39;+2&#39;){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;echo &quot;error mobile is &quot;.$m.&quot;&amp;lt;br/&amp;gt;&quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;else{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;//finding the 3rd number&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;$pnum=substr($mob,4,1);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;switch($pnum){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;case 0:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;$fin=$m1.&#39;0&#39;.$mr;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;break;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;case 6:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;$fin=$m1.&#39;0&#39;.$mr;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;break;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;case 9:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;$fin=$m1.&#39;0&#39;.$mr;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;break;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;case 2:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;$fin=$m1.&#39;2&#39;.$mr;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;break;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;case 7:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;$fin=$m1.&#39;2&#39;.$mr;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;break;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;case 8:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;$fin=$m1.&#39;2&#39;.$mr;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;break;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;case 1:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;$fin=$m1.&#39;1&#39;.$mr;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;break;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;case 4:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;$fin=$m1.&#39;1&#39;.$mr;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;break;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;case 5:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;$npnum=substr($mob,5,1);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;$mrn=substr($mr,1);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;switch($npnum){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt; case 0:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;$fin= $m1.&#39;2&#39;.$mrn;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt; break;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt; case 1:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;$fin= $m1.&#39;0&#39;.$mrn;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt; break;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt; case 2:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;$fin= $m1.&#39;1&#39;.$mrn;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;break;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;break;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;$rt=&quot;orignal :&quot;.$m.&quot;(&quot;.$nlen.&quot;)&quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;if(strlen($fin)!=13){ $rt=&quot;orignal :&quot;.$m.&quot;(&quot;.$nlen.&quot;)&quot;;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;$p= &quot;&amp;lt;li class=&#39;dd&#39; &amp;gt;&amp;lt;font color=&#39;red&#39;&amp;gt;&quot;.$error.&quot;&amp;lt;/font&amp;gt;&amp;lt;font color=&#39;green&#39;&amp;gt; final: &quot;.$fin.&quot;(&quot;.strlen($fin).&quot;) &quot;.$rt. &quot;and during modification: &quot;.$mob .&quot;| init :&quot;.$m1.&quot;|remaining :&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;&quot;.$mr.&quot;&amp;lt;br/&amp;gt;&quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;echo $p;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;$filecontent.=$p;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;$cq=&quot;update &quot;.$tb.&quot; set &quot;.$mobile.&quot;=&#39;&quot;.$fin.&quot;&#39; where &quot;.$id.&quot;=&#39;&quot;.$fq[$id].&quot;&#39;&quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;$sq= &amp;nbsp;$cq.&quot;&amp;lt;br/&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/li&amp;gt;&quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;echo $sq; $filecontent.=$sq;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;mysql_query($cq);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//while close&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;echo &quot;&amp;lt;/ul&amp;gt;&quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// documenting actions&lt;br /&gt;
&amp;nbsp;$actionfile=fopen(&quot;egyptmobilefix.txt&quot;,&quot;w+&quot;);&lt;br /&gt;
fwrite($actionfile,$filecontent);&lt;br /&gt;
fclose($actionfile);&lt;br /&gt;
&lt;br /&gt;
$q2=mysql_query(&quot;select * from &quot;.$tb);&lt;br /&gt;
while($fq2=mysql_fetch_assoc($q2)){&lt;br /&gt;
$mq=$fq2[$mobile];&lt;br /&gt;
$lmq=strlen($mq);&lt;br /&gt;
$smq=substr($mq,0,2);&lt;br /&gt;
if($lmq==11&amp;amp;&amp;amp;$smq==&#39;01&#39;){&lt;br /&gt;
$fin=&#39;+2&#39;.$mq;&lt;br /&gt;
$cq2=&quot;update &quot;.$tb.&quot; set &quot;.$mobile.&quot;=&#39;&quot;.$fin.&quot;&#39; where &quot;.$id.&quot;=&#39;&quot;.$fq2[$id].&quot;&#39;&quot;;&lt;br /&gt;
&lt;br /&gt;
echo $cq2.&quot;&amp;lt;br/&amp;gt;&quot;;&lt;br /&gt;
mysql_query($cq2);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if($format==false){&lt;br /&gt;
mysql_query(&quot;UPDATE &quot;.$tb.&quot; SET &amp;nbsp; &amp;nbsp;&quot;.$mobile.&quot; = replace(&quot;.$mobile.&quot;, &#39;00&#39;, &#39;+&#39;) WHERE &amp;nbsp;&quot;.$mobile.&quot; LIKE &#39;00%&#39;;&quot;);}&lt;br /&gt;
elseif($format==true){&lt;br /&gt;
mysql_query(&quot;UPDATE &quot;.$tb.&quot; SET &amp;nbsp; &amp;nbsp;&quot;.$mobile.&quot; = replace(&quot;.$mobile.&quot;, &#39;+&#39;, &#39;00&#39;) WHERE &amp;nbsp;&quot;.$mobile.&quot; LIKE &#39;+%&#39;;&quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
This is file updates mobile numbers in egypt after the October additional number with php, it only edits number starting with +201XXXXXXXX that counts 12 and 01XXXXXXXX that counts 10 and it does handle +2015xxxxxxxx that counts 13 and 015xxxxxxxx that counts 11.&lt;br /&gt;
it does not mess with already updated numbers.&lt;br /&gt;
it only works on the pattern which means:&lt;br /&gt;
(&quot;it does not repair number that is less or more than &amp;nbsp;10 characters and starts with 01&quot;,&lt;br /&gt;
&quot;and it does not repair number that is less or more than 12 characters and starts with+201&quot;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
then it set every 11 character phone number that starts with 01XXXXXXXXX to +201XXXXXXXXX&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ****************************&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;* &amp;nbsp;HOW TO USE &amp;nbsp;THE FILE&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp;&amp;nbsp; *&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;****************************&lt;br /&gt;
*********************************************************&lt;br /&gt;
1- Before using please export &amp;amp; backup your table; for your own Data safety.&lt;br /&gt;
2- make sure that the mobile field in your database supports at least 14 character&lt;br /&gt;
2- add this file to webserver&lt;br /&gt;
3- modify the variables in the beging of the file according to your case&lt;br /&gt;
&amp;nbsp;To set:&lt;br /&gt;
&amp;nbsp;- connection file name modify $dbconn value&lt;br /&gt;
&amp;nbsp;- table name modify $tb value&lt;br /&gt;
&amp;nbsp;- id column name modify $id value&lt;br /&gt;
&amp;nbsp;- mobile column name modify $mobile value&lt;br /&gt;
&lt;br /&gt;
if you need to revise, a file is exported to the&lt;br /&gt;
named egyptmobilefix.txt to the directory of this file&lt;br /&gt;
&lt;br /&gt;
**************************************&lt;br /&gt;
default format&#39;+201XXXXXXXXX&#39;&lt;br /&gt;
to set final format &#39;00201XXXXXXXXX&#39; set variable $format=true;&lt;br /&gt;
to set final format &#39;+201XXXXXXXXX&#39; set variable $format=false;&lt;br /&gt;
&lt;br /&gt;
Developed by: Mostafa El-Bakly&lt;br /&gt;
Alexandria ,Egypt&lt;br /&gt;
you can contact me if you need any help&lt;br /&gt;
elbakly is my username at gmail&lt;br /&gt;
*/&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;style type=&quot;text/css&quot; &amp;gt;&lt;br /&gt;
.dd{&lt;br /&gt;
border: 1px solid;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://egyptmobilenumberfix.blogspot.com/feeds/4344049332100301084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://egyptmobilenumberfix.blogspot.com/2012/02/egyptian-mobile-phone-numbers-changed.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1827127654792639979/posts/default/4344049332100301084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1827127654792639979/posts/default/4344049332100301084'/><link rel='alternate' type='text/html' href='http://egyptmobilenumberfix.blogspot.com/2012/02/egyptian-mobile-phone-numbers-changed.html' title='egypt mobile number database fix'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06723571957174067834</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total><georss:featurename>Mostafa Kamel, Qism El-Raml, Alexandria, Egypt</georss:featurename><georss:point>31.234747474335439 29.967527389526367</georss:point><georss:box>31.22795897433544 29.957656889526366 31.241535974335438 29.977397889526369</georss:box></entry></feed>