cybr Posted March 4, 2006 Share Posted March 4, 2006 bonjour, j'utilise sur mon site le fonction highlight_string pour colorer du code php cependant mon code comprend des guillemets dans des apostrophes, cf ci desous <?php highlight_string('<?php $deja_connecte=mysql_query("SELECT id from compteur live where ip='$ip_connecte'"); ?>');?> Le probleme est donc que cela me génère une erreur car php s'arrete apres where ip= Quelqu'un connait il une facon de contourner ce probleme ?? Link to comment Share on other sites More sharing options...
kmlz Posted March 4, 2006 Share Posted March 4, 2006 Oui, il faut que tu déspécialises avec un \ les deux ' dans la fonction. <?php highlight_string('<?php $deja_connecte=mysql_query("SELECT id from compteur live where ip=\'$ip_connecte\'"); ?>'); ?> Link to comment Share on other sites More sharing options...
cybr Posted March 4, 2006 Author Share Posted March 4, 2006 Ok c'est bon, tout marche comme je le voulais Merci de votre aide Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.