Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
Student Issue Portal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
17
Issues
17
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
KLUGLUG
Student Issue Portal
Commits
871bac55
Commit
871bac55
authored
Oct 25, 2019
by
sunkara pallavi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge branch 'master' of
https://code.swecha.org/KLUGLUG/student-issue-portal
parent
ca876665
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
changing_phone_number_format
changing_phone_number_format
+26
-0
No files found.
changing_phone_number_format
0 → 100644
View file @
871bac55
Changing Phone number format
_________________________________
-->We need to change code in CLASS.FORMAT.PHP
$stripped= preg_replace("/[^0-9]/", "", $phone);
if(strlen($stripped) == 7)
return preg_replace("/([0-9]{3})([0-9]{4})/", "$1-$2",$stripped);
elseif(strlen($stripped) == 10)
return preg_replace("/([0-9]{3})([0-9]{3})([0-9]{4})/", "($1) $2-$3",$stripped);
else
return $phone; */
__________________________________________________
-->Replace the above code with below code
__________________________________________________
$stripped= preg_replace("/[^0-9]/", "", $phone);
if(strlen($stripped) == 7)
return preg_replace("/([0-9]{7})/", "$1",$stripped);
elseif(strlen($stripped) == 10)
return preg_replace("/([0-9]{10})/", "$1",$stripped);
else
return $phone;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment