Jump to content
php.lv forumi

kādā laukā glabāt naudu un kā atdalīt 000'000


anonīms

Recommended Posts

Sveiki. Primārais ir kā labāk glabāt naudu? kādā kollonas tipā? int? Runa neiet par santīmiem un dažiem latiem, bet miljoniem.

50000000 (50miljoni).

Un papildus tam vēl ar kādu funkciju varētu padarīt acij tīkamāku to summu? 50'000'000 ?

Paldies

Link to comment
Share on other sites

Glabā kā gribi. Vari glabāt kā double type.

 

Ar 2 simboliem aiz komata

echo number_format ( 50000000, 2 , '.' , "'" );

 

 

noapaļojot to, kas ir aiz komata

echo number_format ( 50000000, 0 , '.' , "'" );

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...