Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php get precent price

public static function getPercentPrice(int $price, int $percent): int
    {
        return ($price / 100) * $percent;
    }
Comment

php get precent price

<?php
$percentage = 50;
$totalWidth = 350;

$new_width = ($percentage / 100) * $totalWidth;

echo $new_width; // output 175
?>
Comment

PREVIOUS NEXT
Code Example
Php :: delete uploaded media file wp using code 
Php :: convert php array to javascript array 
Php :: wordpress get site url 
Php :: set session data in laravel 
Php :: laravel update from query 
Php :: use if in laravel blade 
Php :: laravel nova create user 
Php :: wp do sql query from function 
Php :: show date time with milliseconds php 
Php :: /laravel-2020-07-27.log" could not be opened 
Php :: kill laravel server 
Php :: php client enable short tags 
Php :: wordpress get category page title 
Php :: how import the impliment countable php 
Php :: get today date in php 
Php :: php 7.4 extension sqlite ubuntu 
Php :: install php-fpm centos 7 
Php :: php remove item array 
Php :: check is array laravel 
Php :: laravel session add array 
Php :: php is day light saving time 
Php :: link to another page php 
Php :: how to get video duration in php 
Php :: google fonts change font in echo php 
Php :: php download rate limit 
Php :: php check if folder empty 
Php :: seconds to days hours minutes seconds php 
Php :: laravel tinker add user 
Php :: Allowed memory size of 1610612736 bytes exhausted 
Php :: increase upload limit in phpmyadmin docker 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =