How to remove PHP ending tag in PhpStorm
Leaving PHP ending tags in your PHP scripts can cause confusement. For example when you have a blank newline below the PHP ending tag it
Home » PHP
Leaving PHP ending tags in your PHP scripts can cause confusement. For example when you have a blank newline below the PHP ending tag it
public function arrayToTable($rows, $idName = ”, $settings = array()) { if (is_array($rows) && count($rows)) { $maxCellCounter = 0; foreach ($rows as $row) { $cellCounter =
/** * Find the position of the Xth occurrence of a substring in a string * @param $haystack * @param $needle * @param $number integer
function moveArrayKeyToTop(&$array, $key) { $temp = array($key => $array[$key]); unset($array[$key]); $array = $temp + $array; } function moveArrayKeyToBottom(&$array, $key) { $value = $array[$key]; unset($array[$key]); $array[$key]
function fileSizeConvert($bytes) { $bytes = floatval($bytes); $arBytes = array( 0 => array( “UNIT” => “TB”, “VALUE” => pow(1024, 4) ), 1 => array( “UNIT” =>
function getTableColumnNames($table) { if ($table) { $query = “SHOW COLUMNS FROM ” . $table; $res = $GLOBALS[‘TYPO3_DB’]->sql_query($query); $fields = array(); while ($row = $GLOBALS[‘TYPO3_DB’]->sql_fetch_assoc($res)) {
function hex2rgb($hex) { if ($hex) { $hex = str_replace(‘#’, ”, $hex); if (strlen($hex) == 3) { $r = hexdec(substr($hex, 0, 1) . substr($hex, 0, 1));
function natksort(&$array) { $keys = array_keys($array); natcasesort($keys); if (is_array($keys) && count($keys)) { foreach ($keys as $k) { $new_array[$k] = $array[$k]; } } $array = $new_array;
function stristr_array($string, $needleArray) { if (!is_array($needleArray)) { return false; } if (is_array($needleArray) && count($needleArray)) { foreach ($needleArray as $needle) { if (stristr($string, $needle)) { return