What do you want to save?
Add Code snippet
New code examples
-
PHP 2022-02-14 09:30:11
convert gb to bytes php
function toByteSize($p_sFormatted) { $aUnits = array('B'=>0, 'KB'=>1, 'MB'=>2, 'GB'=>3, 'TB'=>4, 'PB'=>5, 'EB'=>6, 'ZB'=>7, 'YB'=>8); $sUnit = strtoupper(trim(substr($p_sFormatted, -2))); if (intval($sUnit) !== 0) { ... Add solution -
PHP 2022-01-23 06:46:22
what is use of in_array() function in php
<?php $os = array("Apple", "Banana", "Lemon"); if (in_array("Apple", $os)) { echo "Yeah. Exist Apple"; } if (!in_array("Buleberry", $os)) { echo "Oh, Don't Exist Blueberry!!!"... Add solution -
PHP 2021-11-12 14:47:14
validate if correct image url php
$image_name = $_FILES["inputname"]["name"]; $allowed_extensions = array("png", "jpg", "jpeg"); $image_extension = explode(".", $image_name); /* *Explode returns array of words *Explode Exampl... Add solution -
PHP 2021-10-24 02:42:08
php convert mb to bytes
function toByteSize($p_sFormatted) { $aUnits = array('B'=>0, 'KB'=>1, 'MB'=>2, 'GB'=>3, 'TB'=>4, 'PB'=>5, 'EB'=>6, 'ZB'=>7, 'YB'=>8); $sUnit = strtoupper(trim(substr($p_sFormatted, -2))); if (intval($sUnit) !== 0) { ... Add solution -
PHP 2021-10-01 01:40:05
php check if uploaded file is image
$image_name = $_FILES["inputname"]["name"]; $allowed_extensions = array("png", "jpg", "jpeg"); $image_extension = explode(".", $image_name); /* *Explode returns array of words *Explode Exampl... Add solution -
PHP 2021-09-09 13:09:02
php validate image
$image_name = $_FILES["inputname"]["name"]; $allowed_extensions = array("png", "jpg", "jpeg"); $image_extension = explode(".", $image_name); /* *Explode returns array of words *Explode Exampl... Add solution -
PHP 2021-09-05 04:18:02
php close unclosed HTML Tags
function closetags($html) { preg_match_all('#<(?!meta|img|br|hr|input\b)\b([a-z]+)(?: .*)?(?<![/|/ ])>#iU', $html, $result); $openedtags = $result[1]; preg_match_all('#</([a-z]+)>#iU', $html, $result); $closedtags = $result[... Add solution