Rusty.Metal Posted March 9, 2003 Share Posted March 9, 2003 if($row["TutorialDocFile"] == '') {echo "test";} else {echo "etst2";} why dosent this work i get Parse error: parse error, unexpected $ in /home/digital8/public_html/php/pages/tutorials_cat.php on line 41 there isent even a line 41 ? Link to comment Share on other sites More sharing options...
0 Ricky Baby Posted March 9, 2003 Share Posted March 9, 2003 try this if($row["TutorialDocFile"] == "'') {echo "test";} else {echo "etst2";} your missing a " after the == Link to comment Share on other sites More sharing options...
0 Rusty.Metal Posted March 9, 2003 Author Share Posted March 9, 2003 im not useing " im useing ' Link to comment Share on other sites More sharing options...
0 Chadwick Posted March 9, 2003 Share Posted March 9, 2003 ur suppose to use " " though ;) Link to comment Share on other sites More sharing options...
0 AshMan Posted March 9, 2003 Share Posted March 9, 2003 Can you try: if (!$row["TutorialDocFile"]') { echo "test"; } else { echo "test2"; } Link to comment Share on other sites More sharing options...
0 Stokkolm Posted March 9, 2003 Share Posted March 9, 2003 You have "etst2" in the second line, i'm only pointing this out because you couldn't spell "using" right, but should that be "test2". Link to comment Share on other sites More sharing options...
0 Ricky Baby Posted March 9, 2003 Share Posted March 9, 2003 hmmm i dunno then Link to comment Share on other sites More sharing options...
0 Stokkolm Posted March 9, 2003 Share Posted March 9, 2003 if ($row["TutorialDocFile"]== "") { echo "test"; } else { echo "test2"; } I believe that would be it. Link to comment Share on other sites More sharing options...
0 Rusty.Metal Posted March 9, 2003 Author Share Posted March 9, 2003 my book says ' :(, and tutorial i read a long time ago none of the suggestions worked Link to comment Share on other sites More sharing options...
0 CitruS Posted March 9, 2003 Share Posted March 9, 2003 if($row["TutorialDocFile"] == '') {echo "test";} else {echo "etst2";} why dosent this work i get Parse error: parse error, unexpected $ in /home/digital8/public_html/php/pages/tutorials_cat.php on line 41 there isent even a line 41 ? The snipped you are showing us, is it even from tutorial_cat.php? If it is, Is line 41 "?>" Link to comment Share on other sites More sharing options...
0 Rusty.Metal Posted March 9, 2003 Author Share Posted March 9, 2003 ya the code is in tutorials_cats.php and ya its a ?> Link to comment Share on other sites More sharing options...
0 Rusty.Metal Posted March 10, 2003 Author Share Posted March 10, 2003 anyone? Link to comment Share on other sites More sharing options...
0 BxBoy Posted March 10, 2003 Share Posted March 10, 2003 what *exactly* are you trying to do? Link to comment Share on other sites More sharing options...
0 Tim Dorr Veteran Posted March 10, 2003 Veteran Share Posted March 10, 2003 Is that the ONLY code you have in this file? Would you mine posting the file as an attachment? You've obviously got a $ somewhere you shouldn't... Link to comment Share on other sites More sharing options...
0 Rusty.Metal Posted March 10, 2003 Author Share Posted March 10, 2003 k n/p tutorials_cat.php Link to comment Share on other sites More sharing options...
0 WDZ Posted March 10, 2003 Share Posted March 10, 2003 if (isset($section)){ while ( $row = mysql_fetch_array ($result) ) { Those if() and while() statements have no closing braces... you ended the script without ending those... ;) Link to comment Share on other sites More sharing options...
0 Rusty.Metal Posted March 10, 2003 Author Share Posted March 10, 2003 sorry for such a simple mistak.. i have been messing it with it for a while so i might have lost it a long time ago in the edit :| Link to comment Share on other sites More sharing options...
Question
Rusty.Metal
if($row["TutorialDocFile"] == '') {echo "test";} else {echo "etst2";}why dosent this work i get
Parse error: parse error, unexpected $ in /home/digital8/public_html/php/pages/tutorials_cat.php on line 41
there isent even a line 41 ?
Link to comment
Share on other sites
16 answers to this question
Recommended Posts