Show block in particular nodes having some string in title I have a block and I need to show this block only in some situations.
For example if title of node includes "abc", block will be visible else it won't.
From visibility settings of block I use this code snippet:

&lt;?php
$match = FALSE;

$url = request_uri();
if (strpos($url, "myword")) {
  $match = TRUE;
}
?&gt;


I'm sure that "myword" is included in full URL of node.
I tried to debug it by adding "echo $url" but it didn't write this line into page.

How can I solve this?

edit: in last line i forgot to add "return $match;" which returned always false.
Try:

if (strpos($url, 'myword') !== FALSE) {
  $match = TRUE;
}


strpos() returns the zero-based index of the first occurrence of the substring. 

So if "myword" is at the start of the URI string strpos() will return 0, and since 0 == FALSE in terms of a conditional, it will fail.

I've just tested your code and it works fine with the slight change.