CodingSimple PHP and SQL

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  ANT_THOMAS   
 To:  Peter (BOUGHTONP)     
32051.13 In reply to 32051.12 
Haha, what an idiot, right, one step further now, but still an error.

code:
Parse error: syntax error, unexpected $end in /home/wakeupb/public_html/blog/indextest1.php on line 76


Line 76 being the last line of the code

HTML code:
</html>


So the last bit is...

PHP code:
echo("
 
 
</div>
<div class='blog-title'>  
<table width='100%' border='0' cellpadding='0'>
    <tr>
      <td>$title</td>
      <td align='right'>$date @ $ip_address</td>
    </tr>
  </table></div>
<div class='blog-body'>
");
 
if (strlen($news_brief) < 300)
{
// less than 300 chars, so not cut off in middle of word; show full thing.
echo $news_brief;
}
else
{
// 300 or more characters, so remove any part-words from end of string by having it end in whitespace.
preg_match('/(\S+\s+?){1,50}/', $news_brief, $nb_fullwords);
echo $nb_fullwords[0];
}
 
echo ("
<a href='LINK'>[read more]</a></br></br></div> 
 
</div>
<br>
<br>
 
");
 
?>
 
</html>

Antoine
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  ANT_THOMAS      
32051.14 In reply to 32051.13 
Hmmm, can't see anything obviously wrong there.

What are you editing with?
An editor with syntax highlighting should be able to highlight any unclosed strings/functions/etc.

If you can be arsed download & setting it up, I use PHPEclipse which has syntax highlighting (and various other useful features), and should highlight if there's anything unclosed in the file.
0/0
 Reply   Quote More 

 From:  ANT_THOMAS   
 To:  Peter (BOUGHTONP)     
32051.15 In reply to 32051.14 
I've been using <cough>Dreamweaver</cough>, I'll give PHPEclipse a go.

Antoine
0/0
 Reply   Quote More 

 From:  ANT_THOMAS   
 To:  Peter (BOUGHTONP)     
32051.16 In reply to 32051.14 

Found it! Sorted now!

 

Thanks loads for the help.


Antoine
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  ANT_THOMAS      
32051.17 In reply to 32051.16 
Not a problem. :)
0/0
 Reply   Quote More 

 From:  Ben (BENLUMLEY)  
 To:  Peter (BOUGHTONP)     
32051.18 In reply to 32051.14 
i've not got on with that. I use Zend Dev Environment, but its a bit annoying at times, it likes to pause for a second randomly.
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  Ben (BENLUMLEY)     
32051.19 In reply to 32051.18 
Well I don't really get on with any editors, but I use Eclipse often enough for other stuff to cope with its various annoyances.
0/0
 Reply   Quote More 

 From:  Ben (BENLUMLEY)  
 To:  Peter (BOUGHTONP)     
32051.20 In reply to 32051.19 
i'd imagine you to be a vim user.
0/0
 Reply   Quote More 

Reply to All    
 

1–20

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats