Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $link = 'https://google.com';
- $unacceptables = array('https:','.doc','.pdf', '.jpg', '.jpeg', '.gif', '.bmp', '.png');
- foreach ($unacceptables as $unacceptable)
- {
- if (strpos($link, $unacceptable) === true) {
- echo 'Unacceptable Found<br />';
- }
- else {
- echo 'Acceptable!<br />';
- }
- }
- // ...
- if (strpos($link, $unacceptable) !== false) {
- if (strpos($link, $unacceptable) !== false) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement