Answers for "php get rid of file name"

PHP
9

php get filetype

<?php
echo filetype('/etc/passwd');  // file
echo filetype('/etc/');        // dir
?>
Posted by: Guest on February-03-2021
0

php get variable by string name

${$variableName} or $$variableName;

//example:

$variableName = 'foo';
$foo = 'bar';

// The following are all equivalent, and all output "bar":
echo $foo;
echo ${$variableName};
echo $$variableName;
Posted by: Guest on January-04-2021

Browse Popular Code Answers by Language