Skip to content

Instantly share code, notes, and snippets.

@fofotara
Created November 1, 2018 21:11
Show Gist options
  • Save fofotara/7907b64dc877fd9563d70888c3fa12d1 to your computer and use it in GitHub Desktop.
Save fofotara/7907b64dc877fd9563d70888c3fa12d1 to your computer and use it in GitHub Desktop.
$url = 'https://www.castajanspro.com/admin/basvuru.php?act=ist-1&page=1';
$urlarray = explode("&", $url);
array_pop($urlarray);
$sonUrl = $urlstring = implode('',$urlarray) ;
@fofotara
Copy link
Author

fofotara commented Nov 1, 2018

$url = 'https://www.castajanspro.com/admin/basvuru.php?act=ist-1&page=1';

         if(strstr($url,"page")){
             $urlarray = explode("&", $url);

             array_pop($urlarray);

             $sonUrl = $urlstring = implode('',$urlarray;
         }else
         {
             $sonUrl = $url;
         }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment