开发者

PHP tags. How to minimize the tags usage in php script

开发者 https://www.devze.com 2022-12-18 21:09 出处:网络
I am using an ask answer script on a website and it converts the headline title wor开发者_开发知识库ds into the search query tags automatically.

I am using an ask answer script on a website and it converts the headline title wor开发者_开发知识库ds into the search query tags automatically.

For example: "Who are you?" is converted into tags 'Who' 'are' and 'you' tags respectively. I want tags to be displayed only if the letters in the word are greater than 4. Is it possible?

I am not into php but I searched for the 'tags' in my script and have uploaded the result here http://pastebin.com/m670a1609. Kindly let me know which source file would help in achieving this..

Thanks!


I want tags to be displayed only if the letters in the word are greater than 4. Is it possible?

You can do like this:

 if (strlen($your_word) > 4)
 {
   // go ahead
 }


Surely it would be easier to directly ask the provider of the script for help. A quick Google search makes me believe that AnswerScript is a commercial package that comes with support.


Maybe you should be looking for something like

explode(' ', $title_words) 

and not php tags. This function splits the variable $title_words into separate array elements using a space as a delimiter. More or less what that script does to that title.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号