编写文本搜索功能的问题 [英] problem writing text search function

查看:46
本文介绍了编写文本搜索功能的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到解析错误:解析错误/home/houseproudlancs_co_uk/search.php

在第65行当我打开页面时,第65行将是开始的行

with if(textsearch


$ search_for =" is is quot ;;

$ the_items_description ="这是描述的去处;

if(textsearch($ item_category)== true {

echo(" correct" ;);

}其他{

echo(不正确);

}

函数textsearch( $ the_items_description)

{


$ pos = strpos($ the_items_description,$ search_for);


if( $ pos === false){

textsearch = false;

} else {

textsearch = true;

}

i get "Parse error: parse error in /home/houseproudlancs_co_uk/search.php
on line 65" when i open the page, line 65 would be the line that starts
with if (textsearch

$search_for = "is";
$the_items_description = "this is where the description would go";
if (textsearch($item_category) == true {
echo ("correct");
} else {
echo ("incorrect");
}
function textsearch($the_items_description)
{

$pos = strpos($the_items_description, $search_for);

if ($pos === false) {
textsearch = false;
} else {
textsearch = true;
}

推荐答案

search_for =" is;
search_for = "is";


the_items_description =" this是描述的去处;

if(textsearch(
the_items_description = "this is where the description would go";
if (textsearch(


item_category)== true {

echo(" correct ;);

} else {

echo(不正确);

}

函数textsearch(
item_category) == true {
echo ("correct");
} else {
echo ("incorrect");
}
function textsearch(


这篇关于编写文本搜索功能的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆