Hi
I have the following piece of code:
$multiLinks = array();
foreach ( $matches[0] as $k => $match ) {
if ( $post->multiurl_token ) {
if ( strpos($matches[2][$k], 'http://mysite.com') === false ) {
$multiLinks[$matches[2][$k]] = $match.coes[3][$k];
}
}
else {
$multiLinks[$matches[2][$k]] = $matches[3][$k];
}
}
I want to add an additional check alongside the 'http://mysite.com' so that it tests against 'http://mysite.com' OR 'http://localhost'
In addition it would be brilliant if I could create a variable say $localhost which determines whether to check for 'http://localhost' and be say 0 for check and 1 for don't check. Then if $localhost=0 check against 'http://mysite.com' and 'http://localhost' or if $localhost=1 just check against 'http://mysite.com'
Sorry if this sounds gibberish and I've used all the wrong terminology - I've tried to explain it as best I can.
Can anyone help please?
Thank you
Mark