Advertisement
reenadak

get Domain From Email

Sep 25th, 2017
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1. <link rel="icon" href="favicon.gif" type="image/gif" sizes="16x16">
  2. // Set Favicon
  3.  
  4. function getDomainFromEmail($email)
  5. {
  6.     // Get the data after the @ sign
  7.     return substr(strrchr($email, "@"), 1);
  8. }
  9.  
  10. $path = "/testweb/home.php";
  11.  
  12. //Show filename with file extension
  13. echo basename($path) ."<br/>";
  14.  
  15. //Show filename without file extension
  16. echo basename($path,".php");
  17. ?>
  18. The output of the code above will be:
  19. home.php
  20. home
  21.  
  22.  
  23.  $quote = DB::table('quotes')
  24.         ->select('quote')
  25.         ->orderBy('rand()')
  26.         ->limit(1)
  27.         ->pluck('quote');
  28.     <h4><?php echo $quote; ?></h4>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement