本文介绍了搜索数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我创建了一个数组,但我需要搜索它。从mysql调用创建数组。代码如下: ****************** 函数respond_check($ qid) { 包括db.inc.php; $ postchk2 = mysql_query(" SELECT * FROM`answer`,`users`在哪里`qid` = $ qid AND`a_uid` =`userid` LIMIT 0,30",$ db); while($ userx = mysql_fetch_array($ postchk2)) { $ poster2 = $ u_row22 [''username'']; } } ****************** 我已经尝试包括各种* if *语句来搜索 数组中的$ X(确实存在),但我一直惨遭失败。建议? I have an array created but I need to search it. The array is createdfrom a mysql call. Code as follows: ******************function respond_check($qid){include "db.inc.php";$postchk2 = mysql_query("SELECT * FROM `answers` , `users` WHERE `qid`= $qid AND `a_uid` = `userid` LIMIT 0, 30",$db); while ($userx=mysql_fetch_array($postchk2)){$poster2 = $u_row22[''username''];} } ******************I''ve tried including various *if* statements to search for $X in thearray (which does exist) but I keep failing miserably. Suggestions? 推荐答案 qid) { 包括db .inc.php" ;; qid){include "db.inc.php"; postchk2 = mysql_query(" SELECT * FROM`answer`,`users` WHERE`qid` = postchk2 = mysql_query("SELECT * FROM `answers` , `users` WHERE `qid`= qid AND`a_uid` =`userid` LIMIT 0,30",qid AND `a_uid` = `userid` LIMIT 0, 30", 这篇关于搜索数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-24 01:22