Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
Helpers
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Modulus
Helpers
Commits
07be116c
Commit
07be116c
authored
Jan 17, 2022
by
Sylvain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ajout float_to_money
parent
c3846584
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
src/convert.php
src/convert.php
+12
-0
No files found.
src/convert.php
View file @
07be116c
...
...
@@ -235,3 +235,15 @@ if ( !function_exists('string_to_float')) {
}
}
if
(
!
function_exists
(
'float_to_money'
))
{
/**
* Parsage d'une flottant en nombre monétaire €
* @param Float $value Valeur à virgule
* @return String "1 234,56 €"
*/
function
float_to_money
(
$value
)
{
return
number_format
(
$value
,
2
,
','
,
' '
)
.
' €'
;
}
}
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