Jump to content

Taher

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Taher

  1. Yea, the code is written in swedish..this code:{ echo $row['titel'] . " " . $row['text']; echo "<br />";}displays the correct thing. As far as I understand it's only when I try to place the within the <h1> tagthat it stops working.. I think it has something to do with me missplacing . or " somewhere.. but I think I have tried all (or most) of the possible ways to place them, that makes sence to me anyways..hehe, guess I shouldn't say that the code is in swedish as most of the code is in english.. but the database is in swedish..and thank you for your very fast reply!this code:$result = mysql_query("SELECT * FROM taher_artikel");while($row = mysql_fetch_array($result)) { echo $row['titel'] . " " . $row['text']; echo "<br />"; echo " <div class=\"post\"> <h1> " $row['titel'] . " </h1> <div class=\"box\">text </div> </div> <div class=\"stripe\"> datum xxxxxx tid xxxx </div> "; }gives me this error:Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in /home/virtual/taher.se/public_html/visa.php on line 50where line 50 is the <h1>... lineI can't believe it!! I solved, kind of.. I don't think this is the riht way to do it but it works.. I wouldn't mind if someone who knows 'corrects' it for me.. but here is my solution to anyanone who as the same problem..$result = mysql_query("SELECT * FROM taher_artikel");while($row = mysql_fetch_array($result)) { echo $row['titel'] . " " . $row['text']; echo "<br />"; echo " <div class=\"post\"> <h1> "; echo $row['titel'] . " </h1> <div class=\"box\">text </div> </div> <div class=\"stripe\"> datum xxxxxx tid xxxx </div> "; }
  2. Hello I am a newbie who unfortunatl bought a crappy book so there's no help for me there, I hope somone here has the time to spare..here is a snippet of my code:$result = mysql_query("SELECT * FROM taher_artikel");while($row = mysql_fetch_array($result)) { echo $row['titel'] . " " . $row['text']; echo "<br />"; echo " <div class=\"post\"> <h1> $row['titel'] </h1> <div class=\"box\">$row['text'] </div> </div> <div class=\"stripe\"> datum xxxxxx tid xxxx </div> "; }I know that the above code is wrong in <h1> $row['titel'] </h1> <div class=\"box\">$row['text'] </div>I have altered it in all ways I thought possible but can't figure it out. Help would be very apreciated!
×
×
  • Create New...