Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1617 connectés 

  FORUM HardWare.fr
  Programmation
  PHP

  parse error T_LNUMBER

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

parse error T_LNUMBER

n°807310
thebounty
Posté le 27-07-2004 à 10:02:25  profilanswer
 

salut,
 
j'ai l'erreur suivante:
Parse error: parse error, unexpected T_LNUMBER, expecting ',' or ';' in d:\easyphp1-7\www\index.php on line 18
 
je vais à la ligne à 18 et j'ai juste un tag <table>
 
mon code:
 
setlocale (LC_TIME,"french" );
$dateheure = str_replace("De","de",ucwords(strftime("%A %d %B %Y %H:%M" )));
echo $dateheure;
setlocale (LC_TIME,"English" );
 
echo "<HTML><HEAD></HEAD><BODY>";
 
echo "<TABLE width="750" border="1">";
echo " <TR>
  <TD width="50" height="25">8:30</TD>
  <TD width="50" height="25">10:30</TD>
  <TD width="550" height="25">Intitulé du cours</TD>
  <TD width="100" height="25">Société</TD>
 </TR>
 <TR>
  <TD width="100" heigth="25">Vide</TD>
  <TD width="100" height="25">Vide</TD>
  <TD width="550" height="25">Description</TD>
  <TD width="100" height="25">Vide</TD>
 </TR>
 <TR>
  <TD width="50" heigth="25">Vide</TD>
  <TD width="50" heigth="25">Vide</TD>
  <TD width="550" height="25">Nom prénom intervenant</TD>
  <TD width="100" height="25">Salle</TD>
 </TR>";
echo "</TABLE>";

mood
Publicité
Posté le 27-07-2004 à 10:02:25  profilanswer
 

n°807316
jagstang
Pa Capona ಠ_ಠ
Posté le 27-07-2004 à 10:05:29  profilanswer
 

echo "<TABLE width="750" border="1">";  
 
 
" = chaine en PHP. tu vois pas le problème là?


---------------
What if I were smiling and running into your arms? Would you see then what I see now?  
n°807343
thebounty
Posté le 27-07-2004 à 10:38:37  profilanswer
 

Malheureusement j'ai peu d'expérience dans php. Je ne vois pas le problème.

n°807345
jagstang
Pa Capona ಠ_ಠ
Posté le 27-07-2004 à 10:41:06  profilanswer
 

" est le délélimiteur de chaine en PHP width="750  
 
le " te fais terminer la chaine. dans le code html, tu dois échapper la chaine html, soit avec \", soit avec '
 
je te conseille la 2ème solution
 
soit :  
 
echo "<TABLE width='750' border='1'>";  


---------------
What if I were smiling and running into your arms? Would you see then what I see now?  
n°807346
thebounty
Posté le 27-07-2004 à 10:41:09  profilanswer
 

ok faut que j'utilise des simples quotes.

n°807347
jagstang
Pa Capona ಠ_ಠ
Posté le 27-07-2004 à 10:42:12  profilanswer
 

c'est ça
 
tu peux aussi utiliser l'inverse. à savoir
echo '<TABLE width="750" border="1">';  


---------------
What if I were smiling and running into your arms? Would you see then what I see now?  
n°807348
skeye
Posté le 27-07-2004 à 10:43:55  profilanswer
 

Ou alors échapper les " contenus dans une chaine par un \


---------------
Can't buy what I want because it's free -
n°807349
thebounty
Posté le 27-07-2004 à 10:44:12  profilanswer
 

pfff sauvé. merci.

n°807350
jagstang
Pa Capona ಠ_ಠ
Posté le 27-07-2004 à 10:44:19  profilanswer
 

skeye a écrit :

Ou alors échapper les " contenus dans une chaine par un \


grillé, et moche de surcroit


---------------
What if I were smiling and running into your arms? Would you see then what I see now?  
n°807362
boulax
Inserer phrase hype en anglais
Posté le 27-07-2004 à 10:56:49  profilanswer
 

JagStang a écrit :

grillé, et moche de surcroit


 
bof, moi je préfère aussi échapper.


---------------
Posté depuis des chiottes, sales. Me gusta.
mood
Publicité
Posté le 27-07-2004 à 10:56:49  profilanswer
 

n°807367
skeye
Posté le 27-07-2004 à 10:59:18  profilanswer
 

boulax a écrit :

bof, moi je préfère aussi échapper.


En fait ça dépend du contexte...on peut très bien se contenter d'utiliser echo ' "truc" '; dans certains cas, mais si on veut le caractère ' dans la chaine on a le même pb...[:skeye]


---------------
Can't buy what I want because it's free -
n°807389
Nenelle
Josie Maran addicted
Posté le 27-07-2004 à 11:14:29  profilanswer
 

a noter que echo '' est plus rapide que echo "", dans le deuxieme cas en effet, il fait de l'expansion de variables.
 
donc de maniere generale toujours utiliser echo '' sauf lorsque tu as dans ton expression des variables :)


---------------
http://chilax.com/forum/index.php?showforum=46 => !!!

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  PHP

  parse error T_LNUMBER

 

Sujets relatifs
reload errorsyntax error
[Perl] internal serveur error à la !&f=@error: (10053, 'Software caused connection abort')
VC6 Syntax errorparser error
-Résolu- [EasyPHP] Internal Server Error ![PHP] Super globales et directive error_reporting sur E_ALL
Parse xml xsl xalanerror C2146, C2501et C1004 en VC++
Plus de sujets relatifs à : parse error T_LNUMBER


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR