newbtophp Posted March 2, 2010 Share Posted March 2, 2010 Well my assumption was its impossible, but i had second thoughts regarding this so thought i'd ask the question here. How would i add php tags around php code? (even if its not always accurate). Maybe by manipulating the token_get_all function? Example: function hey($code){ return "hey".$code; } <html> <title>PHPFreaks</title> Would transform into: <?php function hey($code){ return "hey".$code; } ?> <html> <title>PHPFreaks</title> Let me know your thoughts?, and if manipulating token_get_all would work? Quote Link to comment https://forums.phpfreaks.com/topic/193945-adding-tags-around-php-excluding-html/ Share on other sites More sharing options...
ferdi Posted March 2, 2010 Share Posted March 2, 2010 I don't think there's a sure way to do it, anything you use in PHP could just be seen as text. Also, why wouldn't you just insert the tags yourself? Quote Link to comment https://forums.phpfreaks.com/topic/193945-adding-tags-around-php-excluding-html/#findComment-1020686 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.