reenadak icon

get Domain From Email

reenadak | PRO | 09/25/17 06:37:51 PM UTC | 0 ⭐ | 330 👁️ | Never ⏰ | []
PHP |

570 B

|

None

|

0 👍

/

0 👎

<link rel="icon" href="favicon.gif" type="image/gif" sizes="16x16">
// Set Favicon
 
function getDomainFromEmail($email)
{
    // Get the data after the @ sign
    return substr(strrchr($email, "@"), 1);
}
 
$path = "/testweb/home.php";
 
//Show filename with file extension
echo basename($path) ."<br/>";
 
//Show filename without file extension
echo basename($path,".php");
?>
The output of the code above will be:
home.php
home
 
 
 $quote = DB::table('quotes')
        ->select('quote')
        ->orderBy('rand()')
        ->limit(1)
        ->pluck('quote'); 
    <h4><?php echo $quote; ?></h4>

Comments