Jump to content

if statements (contains)


Collegeboox

Recommended Posts

It's easier to do what thorpe suggests than what you want to do.  Think about it:

 

With thorpe's suggestion, you need to check if the link is valid; that it fits the format you're looking for.  But, you can ensure that the iframe the link goes in is correctly formed as you'd be creating it programmatically.

 

With your idea, you'd need to verify that the iframe is correctly formed AND verify that the link within is also valid.  It's more work for no real gain.

 

Regarding output, well, how were you going to output these iframes originally?  Just take the (hopefully well-formed) iframes from the db and echo them, right?  If that's the case, then why can't you simply echo a premade iframe with the particular link variable as its source? 

 

EDIT: see thorpe's code above.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.