phpretard Posted January 16, 2009 Share Posted January 16, 2009 I am trying to include a page based on a session value: [client] => Anthony's << SESSION VALUE include ("clients/".$_SESSION['client']."/index.php"); << CODE include ("clients/Anthony's/index.php"); << DOES NOT EXIST include ("clients/Anthony's/index.php"); << DOES EXIST How can I translate ' to ' based on the code above. Any Help Today? Quote Link to comment Share on other sites More sharing options...
Psycho Posted January 16, 2009 Share Posted January 16, 2009 Just scroll down onthe manual page for htmlentities and you will see related functions. one of which is . . . html_entity_decode Quote Link to comment Share on other sites More sharing options...
phpretard Posted January 16, 2009 Author Share Posted January 16, 2009 Just scroll down onthe manual page for htmlentities and you will see related functions. one of which is . . . html_entity_decode I have tried this 100 different ways before I posted and can't seem to make it work... Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted January 16, 2009 Share Posted January 16, 2009 Did you try: <?php include (html_entity_decode("clients/".$_SESSION['client']."/index.php",ENT_QUOTES)); ?> Ken Quote Link to comment Share on other sites More sharing options...
Psycho Posted January 16, 2009 Share Posted January 16, 2009 As kenrbnsn included in his code, but did not state, the second, optional, parameter for htmlspecialchars_decode is for "quote style": From the manual: quote_style constants Constant Name Description ENT_COMPAT Will convert double-quotes and leave single-quotes alone (default) ENT_QUOTES Will convert both double and single quotes ENT_NOQUOTES Will leave both double and single quotes unconverted Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.