Jump to content

Echo inside Include?


mnybud

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.