• 0

If ()


Question

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

  • 0

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

  • 0

if ($row["TutorialDocFile"]== "")

{

echo "test";

}

else

{

echo "test2";

}

I believe that would be it.

Link to comment
Share on other sites

  • 0
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

  • 0

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

  • 0

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

  • 0

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

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.