Search
 
SCRIPT & CODE EXAMPLE
 

PHP

convert scientific notation to decimal php

echo sprintf('%f', floatval('-1.0E-5'));//default 6 decimal places
echo sprintf('%.8f', floatval('-1.0E-5'));//force 8 decimal places
echo rtrim(sprintf('%f',floatval(-1.0E-5)),'0');//remove trailing zeros
Comment

PREVIOUS NEXT
Code Example
Php :: Adding data to a laravel collection 
Php :: how increase php upload size in wordpress 
Php :: drupal set message 
Php :: insert data using seeder in laravel 
Php :: create database from migration laravel for all 
Php :: laravel eloquent get all 
Php :: search query in laravel 
Php :: calculate total time from start and end datetime in php 
Php :: php get this week date range 
Php :: laravel natural sort 
Php :: uuidv4 php 
Php :: php array sum 
Php :: how to get match date and month in php 
Php :: uppercase php 
Php :: Display the image on the front end from category taxonomy 
Php :: laravel without global scope 
Php :: php extract month and year from date 
Php :: php datetime add 1 weeek 
Php :: laravel json response 
Php :: laravel: get last id 
Php :: cache an array 
Php :: laravel migration remove nullable 
Php :: php submit form in new tab 
Php :: php postgresql 
Php :: give custom field name in laravel form validation error message 
Php :: laravel controller create command in a folder 
Php :: loop foreach laravel with number 
Php :: check mobile or email in laravel 
Php :: check duplicate data in array php 
Php :: drop column table in migration if exist in laravel 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =