Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7860257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:12:46+00:00 2026-06-02T22:12:46+00:00

I have a number (as string) like this: 1.00000 How can I reformat such

  • 0

I have a number (as string) like this: 1.00000

How can I reformat such numbers to only look like 1?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T22:12:53+00:00Added an answer on June 2, 2026 at 10:12 pm

    Use number_format()

    echo number_format('1.000000'); // prints 1
    

    Or use intval()

    echo intval('1.000000'); // prints 1
    

    Or cast it as an integer

    echo (int) '1.000000'; // prints 1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a number as a string like this: 9.756088256835938E-4 but I only can
I have a string like this but number of links can be different for
I have string like this:0:385 (first number is seconds, next numbers are milliseconds), I
I have a plist that looks like this: <dict> <key>Aaron</key> <dict> <key>number</key> <string>1234</string> <key>country</key>
I got a string like this: String text = number|name|url||number2|name2|url2 Now I have written
I have an string like this: Dim value as string = hy the number
I have a number of string like this: var info = Information4Table var next
I have an unformatted telephone number string (5551234567). I would like to format this
I have a string like this: String string ='{{INPUT FILE, NUMBER OF RECORDS},{Item File,
I have NSString like this: @text 932. How I can return number from this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.