mnybud Posted June 1, 2009 Share Posted June 1, 2009 I was hoping someone could help with a newbie question. I am trying to insert a echo into a include and it obviously is not possible how I am doing it. Can anyone give me some suggestions on how to make it work? Here is what I am trying to do... I have these 2 pieces of code which both work fine by themselves: <?PHP include('parser.php?query='); ?> <?php echo $rsAnswer[$i]->answer_text;?> and I am trying to make it work like this so the echo file sets the includes query.... <?PHP include('parser.php?query=<?php echo $rsAnswer[$i]->answer_text;?>'); ?> I know this is not right but can someone show me how to fix it? ??? Link to comment https://forums.phpfreaks.com/topic/160430-echo-inside-include/ Share on other sites More sharing options...
dreamwest Posted June 1, 2009 Share Posted June 1, 2009 You wont need to - after all its just including it. Just think of it as one page not 2 $query = //query include('parser.php'); echo $rsAnswer[$i]->answer_text; Link to comment https://forums.phpfreaks.com/topic/160430-echo-inside-include/#findComment-846629 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.