|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Hey, Im a total newbie, and I was wondering if anyone could suggest why this line of php is giving me a parse error, and suggest possible solutions.
if((substr_count($Urow['user_items'],"ß".$row2['itemneeded']."fi") > 0) && ($ITrow['battle_effect'] <= $Urow['user_statlevel']) && ($ITrow['req_att'] <= $Urow['user_att']) && ($ITrow['req_def'] <= $Urow['user_def']) && ($ITrow['req_mst'] <= $Urow['user_mst']) && ($ITrow['req_ata'] <= $Urow['user_ata']) && ($ITrow['req_evp'] <= $Urow['user_evp']) && ($ITrow['class'] LIKE '%"."ß".$Urow[user_class]."fi"."%' OR $ITrow['class'] = 'ßALLfi')) |
|
#2
|
|||
|
|||
|
Yes its formatted horribly
![]() I suggest spacing it out some, put the different if conditions on different lines, and place what is run if the condition is true on a line by itself. That will go a long way to helping you find the problem. -KM- |
|
#3
|
||||
|
||||
|
What kode_monkey means is making it look like this:
PHP Code:
Now we easily see the problem, which is on the last row of the statement. PHP does not know the 'LIKE' statement, which comes from SQL. I assume that some code is missing between the $ITrow['class'] and the LIKE, a quote (") if nothing else. Good luck |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > Parse error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|