unexpected T_STRING problem..

This is a discussion on unexpected T_STRING problem.. within the alt.comp.lang.php forums, part of the PHP Programming Forums category; hi with this function i get: function retournlisteartricle($nosection) { echo '<table>'; $requete = mysql_query("SELECT art_noarticle, art_titre FROM ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-29-2004
Marc Collin
 
Posts: n/a
Default unexpected T_STRING problem..

hi

with this function i get:

function retournlisteartricle($nosection)
{
echo '<table>';

$requete = mysql_query("SELECT art_noarticle, art_titre FROM ARTICLE
WHERE sou_nosoussection=$nosection");
// affiche l'article en question
if ( mysql_num_rows($requete) != 0 )
{
while ($ligne = mysql_fetch_assoc($requete))
{
echo'<tr><td><a
href="lsttutoriel.php?art_noarticle='.$ligne["art_noarticle"].'">'.$ligne["art_titre"].'</a></td></tr>';
}
}
echo '</table>';

}

Parse error: parse error, unexpected T_STRING, expecting ']'


any idea
--
Borland rulez http://pages.infinit.net/borland
Reply With Quote
  #2 (permalink)  
Old 04-29-2004
Gorf
 
Posts: n/a
Default Re: unexpected T_STRING problem..

"Marc Collin" <os2@videotron.ca> wrote in message
news:Iq_jc.119258$Tu2.2280758@weber.videotron.net. ..
> hi
>
> with this function i get:
>
> function retournlisteartricle($nosection)
> {
> echo '<table>';
>
> $requete = mysql_query("SELECT art_noarticle, art_titre FROM ARTICLE
> WHERE sou_nosoussection=$nosection");
> // affiche l'article en question
> if ( mysql_num_rows($requete) != 0 )
> {
> while ($ligne = mysql_fetch_assoc($requete))
> {
> echo'<tr><td><a
>

href="lsttutoriel.php?art_noarticle='.$ligne["art_noarticle"].'">'.$ligne["a
rt_titre"].'</a></td></tr>';
> }
> }
> echo '</table>';
>
> }
>
> Parse error: parse error, unexpected T_STRING, expecting ']'


You probably need to \" up your quotes in the echo...

--
Gorf


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:14 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0