akirahz Posted September 10, 2006 Share Posted September 10, 2006 i was wondering, i cant seem to figure out whats wrong with my array line, i get this error:Parse error: parse error, unexpected T_STRING in /homepages/8/d155646242/htdocs/passion/inc/modules.inc.php(152) : eval()'d code on line 13here is the code it is reffering too $res = db_res("SELECT `Conf` FROM Modules"); while ( $arr = mysql_fetch_array($res) ) eval($arr[0]);anyone know what i got wrong in here? any help is appreciated, thanks! Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted September 10, 2006 Share Posted September 10, 2006 What's in $arr[0]? The error is in line 13 of whatever is in $arr[0].Ken Quote Link to comment Share on other sites More sharing options...
akirahz Posted September 10, 2006 Author Share Posted September 10, 2006 um , im not sure - would it be line 13 of that file? or something else? Quote Link to comment Share on other sites More sharing options...
.josh Posted September 10, 2006 Share Posted September 10, 2006 instead of eval'ing it, echo it out so you can look for the parse error. the code that eval is trying to run probably has a missing quote or semicolon or some other such thing in it. Quote Link to comment Share on other sites More sharing options...
akirahz Posted September 10, 2006 Author Share Posted September 10, 2006 [quote author=Crayon Violent link=topic=107513.msg431482#msg431482 date=1157871671]instead of eval'ing it, echo it out so you can look for the parse error. the code that eval is trying to run probably has a missing quote or semicolon or some other such thing in it.[/quote]im really not that great at php, how would i echo it, how would the code look exactly? Quote Link to comment Share on other sites More sharing options...
jefkin Posted September 11, 2006 Share Posted September 11, 2006 to echo it, change this:[code]while ( $arr = mysql_fetch_array($res) ) eval($arr[0]);[/code]to this:[code]while ($arr = mysql_fetch_array($res)){ echo "<pre>{$arr[0]}</pre>\n"; eval($arr[0]);}[/code]It will still die at the same place, but your ouput should include a bunch of *whatevers* you keep in 'Conf' field in the database table Modules.when it dies, look at the last output before the death, and count down to line 13... That's your error.Jeff Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.