By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,905 Members | 902 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,905 IT Pros & Developers. It's quick & easy.

using echo but need something to execute php code

P: n/a
I have some code that loads up some php/html files and does a few things to
them and ultimately returns an html file with some php code in it. I then
pass that file onto the user by using echo. Of course then the file doesn't
get seen by the user.

Is there any command that essentially executes the code and then echo's it?

something that will take a string like

'<body>blah<?php echo 'Hello'; ?></body>' and actually interpret the php
code?

e.g., doing

echo '<body>blah<?php echo 'Hello'; ?></body>';

does me no good caues the php code isn't interpreted.

Saving it to a file and then redirecting the user to that file so it will be
executed seems like a roundabout way and causes more problems.
essentially I am trying to include php/html files in one another but I need
to do some parsing on them first. I'd rather not do something like
file_get_contents($Page)
parse($Page)
save($Page)
include "$Page"
as it seems uncessary to have to write the page to disk just to include it.

At

http://us2.php.net/include/
"Another way to "include" a PHP file into a variable is to capture the
output by using the Output Control Functions with include(). For example:"

Seems like I might be able to use that to replace when I use
file_get_contents to get the php code to execute?

Thanks,
Jon

Apr 28 '07 #1
Share this Question
Share on Google+
25 Replies


P: n/a
Jon Slaughter wrote:
Is there any command that essentially executes the code and then
echo's it?
For this specific case you could use eval:

$code = "?><body>blah<?php echo 'Hello'; ?></body>";
eval($code);

Note that the closing tag at the beginning of the eval string is mandatory.
JW
Apr 28 '07 #2

P: n/a

"Janwillem Borleffs" <jw@jwscripts.comwrote in message
news:46***********************@news.euronet.nl...
Jon Slaughter wrote:
>Is there any command that essentially executes the code and then
echo's it?

For this specific case you could use eval:

$code = "?><body>blah<?php echo 'Hello'; ?></body>";
eval($code);

Note that the closing tag at the beginning of the eval string is
mandatory.

Ok. Thats not the specific case I need but maybe it will still work? It is
essentially what I have. That is, I have an html file with some php code in
it similar to the example but just more complex. (actually right now its
just plain html but when I want to add some php stuff I'll need to be able
to have it evaluated).

Thanks,
Jon
Apr 28 '07 #3

P: n/a
On Sat, 28 Apr 2007 22:11:45 GMT, in comp.lang.php "Jon Slaughter"
<Jo***********@Hotmail.com>
<BE***************@newssvr11.news.prodigy.netwrote :
>|
| "Janwillem Borleffs" <jw@jwscripts.comwrote in message
| news:46***********************@news.euronet.nl...
| Jon Slaughter wrote:
| >Is there any command that essentially executes the code and then
| >echo's it?
| >
| For this specific case you could use eval:
| >
| $code = "?><body>blah<?php echo 'Hello'; ?></body>";
| eval($code);
| >
| Note that the closing tag at the beginning of the eval string is
| mandatory.
| >
| >
|
| Ok. Thats not the specific case I need but maybe it will still work? It is
| essentially what I have. That is, I have an html file with some php code in
| it similar to the example but just more complex. (actually right now its
| just plain html but when I want to add some php stuff I'll need to be able
| to have it evaluated).
Make sure the file has the extension of php.
---------------------------------------------------------------
jn******@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
Apr 29 '07 #4

P: n/a
Jon Slaughter wrote:
That is, I have an html file with some php code in it similar to the
example but just more complex.
Let me get this straight... you have an HTML+PHP file. You want your
script to open this file, run the PHP code inside and echo the whole thing
out to the client?

include 'file.php';

--
Toby A Inkster BSc (Hons) ARCS
http://tobyinkster.co.uk/
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Apr 29 '07 #5

P: n/a

"Toby A Inkster" <us**********@tobyinkster.co.ukwrote in message
news:d5************@ophelia.g5n.co.uk...
Jon Slaughter wrote:
>That is, I have an html file with some php code in it similar to the
example but just more complex.

Let me get this straight... you have an HTML+PHP file. You want your
script to open this file, run the PHP code inside and echo the whole thing
out to the client?

include 'file.php';
You obviously didn't read what I said... Sometimes simple answers are not
the correct ones.
Apr 29 '07 #6

P: n/a
Message-ID: <Uq****************@newssvr19.news.prodigy.netfr om Jon
Slaughter contained the following:
>include 'file.php';

You obviously didn't read what I said... Sometimes simple answers are not
the correct ones.

The answer was correct. It's the question we are having a problem with.
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Apr 29 '07 #7

P: n/a

"Geoff Berrow" <bl******@ckdog.co.ukwrote in message
news:05********************************@4ax.com...
Message-ID: <Uq****************@newssvr19.news.prodigy.netfr om Jon
Slaughter contained the following:
>>include 'file.php';

You obviously didn't read what I said... Sometimes simple answers are not
the correct ones.


The answer was correct. It's the question we are having a problem with.
Thats always the case with you guys. Your always right regardless of the
question. "Whats 2 + 2" -"The milk is made from cheese". "But your
wrong!" -"No, your question is wrong".

Your a dipshit...

Apr 29 '07 #8

P: n/a
Message-ID: <5C****************@newssvr23.news.prodigy.netfr om Jon
Slaughter contained the following:
>Your a dipshit...
No, that's /you're/ a dipshit.


--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Apr 29 '07 #9

P: n/a
"Jon Slaughter" <Jo***********@Hotmail.comwrote in message
news:tP****************@newssvr23.news.prodigy.net ...
I have some code that loads up some php/html files and does a few things
to
them and ultimately returns an html file with some php code in it. I then
pass that file onto the user by using echo. Of course then the file
doesn't
get seen by the user.
If you have an html file, that is, a file containing html markup with "html"
or "htm" extension it is _not_ parsed by the php engine,, normaly.
Is there any command that essentially executes the code and then echo's
it?
>
Yes, it's called "print" and it can do more complex things than echo will,
it's simlar, but not actualy the same.
It's described
here->http://www.faqts.com/knowledge_base/...l/aid/1/fid/40
something that will take a string like

'<body>blah<?php echo 'Hello'; ?></body>' and actually interpret the php
code?
Yes, there is.
-------------------------------------
!DOCTYPE blah blah blah
<html>
<head><title></title></head>
<p>stuff in this file that contains html markup with a ".php" extension</p>
<p>Other stuff</p>
<?php
echo '<p>Parse this and include it into the html stuff above and
below</p>';
?>
<p>Other stuff in this file that has a ".php" extension and will be output
as html by the php engine.</p>
<?php
echo '<p>Parsed and included as html in the output with the other markup
around it</p>';
?>
<p>More html markup</p>
<?php
include(myFileIDidStuffTooAMomentAgo.inc);
?>
</body>
</html>
------------------------------------fileName.php
>
e.g., doing

echo '<body>blah<?php echo 'Hello'; ?></body>';

does me no good caues the php code isn't interpreted.
But would if you wrote it as below and saved the file with a php extension..
<body>blah
<?php
echo 'Hello';
?>
</body>
>
Saving it to a file and then redirecting the user to that file so it will
be
executed seems like a roundabout way and causes more problems.
I would have to agree.
>
essentially I am trying to include php/html files in one another but I
need
to do some parsing on them first. I'd rather not do something like
Parsing is a very generic term and may include opperations that have nothing
to do with html output, or php for that matter.
It can only be assumed that you mean "interpreted by the php engine" but you
seem to indicate something else by the context here.
>

file_get_contents($Page)
parse($Page)
save($Page)
include "$Page"
The above could be written into a file with a .php extension as;
---------------------
<?php
$Page = file_get_contents('somepath/Page.txt')
function parse(&$Page)
{
//Losts of parsing code here
}
parse($Page);
file_put_contents($Page);
?>
----------------------
>
as it seems uncessary to have to write the page to disk just to include
it.
>
I would have to agree. So you might write the above as follows;
---------------------
<?php
$Page = file_get_contents('somepath/Page.txt')
function parse(&$Page)
{
//Losts of parsing code
}
parse($Page);
echo $Page;
[Or
print parse($Page);
Or
echo parse($Page);
]
?>
----------------------

I'm not sure that the above is usefull. There seems to be some confusion
about what exactly you are wanting to do.
It may be an inaquacey on my part, or it may be ambiguity on your part ;)
HTH
Vince
Apr 29 '07 #10

P: n/a
"Vince Morgan" <vi****@REMOVEoptusnet.com.auwrote in message
news:46***********************@news.optusnet.com.a u...
Ooops, I always forget to refresh before I post.
I'm safe here, I'm never right;]
Apr 29 '07 #11

P: n/a

Well, I thought I was clear enough. I think what happens is because I use a
simple example that many here think there must be a simple solution. I give
a simple example only to express the problem as concisely as I can instead
of cluttering it up with things that are irrelevant and, I would assume,
only cause more confusion. Its like a math problem, If there is something
I'm trying to solve but the equation is very complicated and I can reduce
the issue down to a similar but much more simple problem then thats what I
would do. I believe my original explination was simple and explained the
problem but I could be wrong. I have gotten a solution from Janwillem which
probalby will work(haven't tried it yet due to other issues).

If it was simple as using include then I would have done it. Peopl elike
Toby and Geoff have a very simplistic view of things and there problem is
that their ego always ends up showing up.

In any case, again, I have a file that is essentially html code in it. It
has a php extension as all my files do. That is not the issue.

The issue is that I have this file, call it MyFile.php and I want to parse
it to modify some html code or generate some html code based on some
context. If I just use include then I have no way of looking at the file?

If I do

include 'MyFile.php'

Then how am I going to modify what I need to modify? Theres no way to get at
the contents of the file that is loaded do do anything.

For example, what if MyFile.php is

<body>
Hello
<div class="table"></div>
<?php
echo 'hello';
?>
</body>

REMEMBER THIS IS JUST A SIMPLIFIED EXAMPLE. Obviously if this was what I was
really trying to do there would be no need to parse it as I could approach
it differently. (so don't tell me I need to approach it differently because
its actually more complicated and maybe I did things backwards but its too
late at this point)

In any case, now I have a file called AddTable.php that essentially takes
this file and parses it for <div class="table"and inserts a table inside
that div.

if I simply do

include 'MyFile.php'

then how can I parse it?

if I do

$file = file_get_contents('MyFile.php');

Then I can easily parse the string $file and modify it to add the table.

so after that I now have $file that looks something like
<body>
Hello
<table>
<tr>
<td>Blah
</td>
</tr>
</table>

<?php
echo 'hello';
?>
</body>

and when I want to send it to the client,

echo $file;

it will not interpret the php code and just send it as text to them (so they
get exactly what is above in $file instead of

<body>
Hello
<table>
<tr>
<td>Blah
</td>
</tr>
</table>
hello
</body>
So I need a way to get $file to interpret the php code before I send it.
Janwillem has said eval will do it and from looking in the manual it seems
like it will work. There is also another solution I mentioned in the
original post that looks like it will work. I might have been able to design
the site differently and been able to avoid this issue but I didn't and I'm
not about to start over at this point just because some jack ass(not you)
gets to confused and doesn't understand the problem.

In any case I hope to try eval soon as I think it will be the easiest
solution and do exactly what I need.

Thanks,
Jon
Apr 29 '07 #12

P: n/a

"Geoff Berrow" <bl******@ckdog.co.ukwrote in message
news:i8********************************@4ax.com...
Message-ID: <5C****************@newssvr23.news.prodigy.netfr om Jon
Slaughter contained the following:
>>Your a dipshit...

No, that's /you're/ a dipshit.
Your a fucking genius... what about the rest of my post? You read that or
did you just scan it for spelling mistakes too?
Apr 29 '07 #13

P: n/a
"Vince Morgan" <vi****@REMOVEoptusnet.com.auwrote in message
news:46***********************@news.optusnet.com.a u...
parse($Page);
[Or
print parse($Page);
Or
echo parse($Page);
]
There had to be an error somewhere ;]
"echo"ing, or "print"ing the output of "parse(&$Page)" as defined won't work
as it doesn't actualy return anything.

Apr 29 '07 #14

P: n/a
"Jon Slaughter" <Jo***********@Hotmail.comwrote in message
news:Be*****************@newssvr14.news.prodigy.ne t...
The issue is that I have this file, call it MyFile.php and I want to parse
it to modify some html code or generate some html code based on some
context. If I just use include then I have no way of looking at the file?

If I do

include 'MyFile.php'

Then how am I going to modify what I need to modify? Theres no way to get
at
the contents of the file that is loaded do do anything.

For example, what if MyFile.php is

<body>
Hello
<div class="table"></div>
<?php
echo 'hello';
?>
</body>

REMEMBER THIS IS JUST A SIMPLIFIED EXAMPLE. Obviously if this was what I
was
really trying to do there would be no need to parse it as I could approach
it differently. (so don't tell me I need to approach it differently
because
its actually more complicated and maybe I did things backwards but its too
late at this point)

In any case, now I have a file called AddTable.php that essentially takes
this file and parses it for <div class="table"and inserts a table inside
that div.

if I simply do

include 'MyFile.php'

then how can I parse it?

if I do

$file = file_get_contents('MyFile.php');

Then I can easily parse the string $file and modify it to add the table.

so after that I now have $file that looks something like
<body>
Hello
<table>
<tr>
<td>Blah
</td>
</tr>
</table>

<?php
echo 'hello';
?>
</body>

and when I want to send it to the client,

echo $file;

it will not interpret the php code and just send it as text to them (so
they
get exactly what is above in $file instead of

<body>
Hello
<table>
<tr>
<td>Blah
</td>
</tr>
</table>
hello
</body>

I think eval() is going to be a little more complicated than you might
imagine, or I imagine perhaps.
However, may I suggest the following.
First, lets say your AddTable.php looks something like below;
also simplified;
--- begin AddTable.php
<?php
function makeTable(&$output)
{
//simplified code to create the table output
$output='<table><tr><td>table stuff</td></tr></table>;
//$output now contains the table html .
}
//load MyFile into $output var below and call makeTable()
$output = file_get_contents('MyFile.php');
makeTable($output);
//$output now has the table html you want to display in the final
output.
echo $output; //echo'ing here will actualy happen at the place it is
included in the file below
?>
-----.end AddTable.php

----- begin Final HTML
<html>
<body>
<p>Hello<p>
<?php
include('AddTable.php');
// AddTable.php is loaded here and the engine parses it immediately.
// After running the makeTable() function in AddTable.php it echo's
$output here
?>
</body>
</html>
----end final HTML

Final result;
<html>
<body>
Hello
<!-- output from include('AddTable.php')
<table>
<tr>
<td>Blah
</td>
</tr>
</table>
--end output from the include
<?php
echo 'hello';
?>
</body>
</html>

I think this is what you want and a lot less complicated than eval().
HTH
Vince
Apr 29 '07 #15

P: n/a

"Vince Morgan" <vi****@REMOVEoptusnet.com.auwrote in message
news:46***********************@news.optusnet.com.a u...
I always make an error :[
--end output from the include
this got included by accident by pasting from your post
------
<?php
echo 'hello';
?>
---------
sorry about that
Apr 29 '07 #16

P: n/a
<snip>
I think this is what you want and a lot less complicated than eval().
HTH
Vince
I can't do that because I have written a somewhat complicate scheme where
most of my files are automatically generated.

Basically I created a script that will take a file that gives the menu items
for a nav menu and it will generate all the html and files references for
those links along with adding some code to modify those links depending on
which page it is at the moment.

Its not complicated but I don't want to go back at this point in time and
rewrite it and the two methods are incompatible. (that is, I cannot use
your way because it would mean I would have to rewrite a lot of stuff).

Utimately I think it probably would have been easier and maybe its not to
difficult to actually modify but I don't feel like doing more work than I
have to at this point. When I rewrite my site I'll try to do a better job
so I'll wait until I get to that point. But if I can't find a method that
works then I might have too... luckily that doesn't seem to be the case.

Thanks,
Jon
Apr 29 '07 #17

P: n/a
Geoff Berrow wrote:
Message-ID: <5C****************@newssvr23.news.prodigy.netfr om Jon
Slaughter contained the following:
>Your a dipshit...

No, that's /you're/ a dipshit.

Geoff,

You shouldn't call him a dipshit. That's an insult to dipshits everywhere.

He's just a typical asshole who doesn't know how to ask a question,
gives people just the information HE thinks we need to figure out the
answer HE wants. Then he blames everyone else for his inadequacies.

It's similar to the philosophy professor who, for the final exam, asks:

"What is the meaning of",

then flunks anyone who doesn't know he means:

"the graffiti scrawled on the wall on the northeast corner of 4th and Main".

If he were to learn how to ask question properly he would get good answers.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Apr 29 '07 #18

P: n/a
Jon Slaughter wrote:
Well, I thought I was clear enough. I think what happens is because I use a
simple example that many here think there must be a simple solution. I give
a simple example only to express the problem as concisely as I can instead
of cluttering it up with things that are irrelevant and, I would assume,
only cause more confusion. Its like a math problem, If there is something
I'm trying to solve but the equation is very complicated and I can reduce
the issue down to a similar but much more simple problem then thats what I
would do. I believe my original explination was simple and explained the
problem but I could be wrong. I have gotten a solution from Janwillem which
probalby will work(haven't tried it yet due to other issues).

If it was simple as using include then I would have done it. Peopl elike
Toby and Geoff have a very simplistic view of things and there problem is
that their ego always ends up showing up.

In any case, again, I have a file that is essentially html code in it. It
has a php extension as all my files do. That is not the issue.

The issue is that I have this file, call it MyFile.php and I want to parse
it to modify some html code or generate some html code based on some
context. If I just use include then I have no way of looking at the file?

If I do

include 'MyFile.php'

Then how am I going to modify what I need to modify? Theres no way to get at
the contents of the file that is loaded do do anything.

For example, what if MyFile.php is

<body>
Hello
<div class="table"></div>
<?php
echo 'hello';
?>
</body>

REMEMBER THIS IS JUST A SIMPLIFIED EXAMPLE. Obviously if this was what I was
really trying to do there would be no need to parse it as I could approach
it differently. (so don't tell me I need to approach it differently because
its actually more complicated and maybe I did things backwards but its too
late at this point)

In any case, now I have a file called AddTable.php that essentially takes
this file and parses it for <div class="table"and inserts a table inside
that div.

if I simply do

include 'MyFile.php'

then how can I parse it?

if I do

$file = file_get_contents('MyFile.php');

Then I can easily parse the string $file and modify it to add the table.

so after that I now have $file that looks something like
<body>
Hello
<table>
<tr>
<td>Blah
</td>
</tr>
</table>

<?php
echo 'hello';
?>
</body>

and when I want to send it to the client,

echo $file;

it will not interpret the php code and just send it as text to them (so they
get exactly what is above in $file instead of

<body>
Hello
<table>
<tr>
<td>Blah
</td>
</tr>
</table>
hello
</body>
So I need a way to get $file to interpret the php code before I send it.
Janwillem has said eval will do it and from looking in the manual it seems
like it will work. There is also another solution I mentioned in the
original post that looks like it will work. I might have been able to design
the site differently and been able to avoid this issue but I didn't and I'm
not about to start over at this point just because some jack ass(not you)
gets to confused and doesn't understand the problem.

In any case I hope to try eval soon as I think it will be the easiest
solution and do exactly what I need.

Thanks,
Jon

Jon,

Maybe if you would have explained it this way in the start you would
have gotten better answers. This is NOT the problem you started with!

As it is, I can think of a couple of ways to do it. But after seeing
the way you treat people trying to help you, I'm not inclined to post them.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Apr 29 '07 #19

P: n/a
Jon Slaughter wrote:
file_get_contents($Page)
parse($Page)
save($Page)
include "$Page"

as it seems uncessary to have to write the page to disk just to include it.
Mount an area of RAM as a virtual disk.

--
Toby A Inkster BSc (Hons) ARCS
http://tobyinkster.co.uk/
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Apr 29 '07 #20

P: n/a

"Toby A Inkster" <us**********@tobyinkster.co.ukwrote in message
news:1s************@ophelia.g5n.co.uk...
Jon Slaughter wrote:
>file_get_contents($Page)
parse($Page)
save($Page)
include "$Page"

as it seems uncessary to have to write the page to disk just to include
it.

Mount an area of RAM as a virtual disk.
Ok, thats something new, I haven't done anything like that. I'll have to
look into it.

Thanks,
Jon
Apr 29 '07 #21

P: n/a
>
Maybe if you would have explained it this way in the start you would have
gotten better answers. This is NOT the problem you started with!
It is exactly the problem I started with. I might have not explained as well
but that is entirely different.
As it is, I can think of a couple of ways to do it. But after seeing the
way you treat people trying to help you, I'm not inclined to post them.
Well, its your choice. I might have overreacted and then that was my fault.
Now that I look at my original post I can see how it doesn't explain it that
well. I thought it was clear at the time.. in any case you just have to look
at the line

"Is there any command that essentially executes the code and then echo's
it?"

you know, Janwillem had no problem with it and he was the first to post. So
it can't be all that unclear.

I just don't like people trying to dictate to me how I'm suppose to think or
what I am thinking about.

"The answer was correct. It's the question we are having a problem with"

Thats just total BS. Now maybe I did overreact. If so then I apologize.
But when I read that I read that Geoff is telling me that my question is
wrong. I'll be damned if questions are wrong. Questions are not
propositions. He could have just said "Hey, I don't understand what your
exactly trying to do." instead of trying to make seem like I'm wrong and
he's right kinda crap. Its not about who's smarter or who's wrong or right
but about solving the problem.
In any case. Whether it was clear or not is unimportant at this point.
Janwillem got it from the start and even if my post was completely unclear
then someone should have been asking "Why would Janwillem say that instead
of what Toby said"?.

Hell, maybe I did overreact but statements like

"The answer was correct. It's the question we are having a problem with"

just piss me off to no end ;/ Its like someone trying to tell me that wrong
answers are right because its the question thats wrong. If I did that in a
class on a test and then after the test went up to him and said "no, the
answer is 1. Your question: "1+1="? is wrong because it should have been
"1+0="". You think he would say "Hey, thats great; Your right!! You get an
A+"? Even in a philosophy class that wouldn't work... even more so.
Wouldn't work in a business either. Its just wrong and Geoff is trying to
feed me that BS.

Jon
Apr 29 '07 #22

P: n/a
Jon Slaughter wrote:
>Maybe if you would have explained it this way in the start you would have
gotten better answers. This is NOT the problem you started with!

It is exactly the problem I started with. I might have not explained as well
but that is entirely different.
>As it is, I can think of a couple of ways to do it. But after seeing the
way you treat people trying to help you, I'm not inclined to post them.

Well, its your choice. I might have overreacted and then that was my fault.
Now that I look at my original post I can see how it doesn't explain it that
well. I thought it was clear at the time.. in any case you just have to look
at the line

"Is there any command that essentially executes the code and then echo's
it?"

you know, Janwillem had no problem with it and he was the first to post. So
it can't be all that unclear.

I just don't like people trying to dictate to me how I'm suppose to think or
what I am thinking about.

"The answer was correct. It's the question we are having a problem with"

Thats just total BS. Now maybe I did overreact. If so then I apologize.
But when I read that I read that Geoff is telling me that my question is
wrong. I'll be damned if questions are wrong. Questions are not
propositions. He could have just said "Hey, I don't understand what your
exactly trying to do." instead of trying to make seem like I'm wrong and
he's right kinda crap. Its not about who's smarter or who's wrong or right
but about solving the problem.
In any case. Whether it was clear or not is unimportant at this point.
Janwillem got it from the start and even if my post was completely unclear
then someone should have been asking "Why would Janwillem say that instead
of what Toby said"?.

Hell, maybe I did overreact but statements like

"The answer was correct. It's the question we are having a problem with"

just piss me off to no end ;/ Its like someone trying to tell me that wrong
answers are right because its the question thats wrong. If I did that in a
class on a test and then after the test went up to him and said "no, the
answer is 1. Your question: "1+1="? is wrong because it should have been
"1+0="". You think he would say "Hey, thats great; Your right!! You get an
A+"? Even in a philosophy class that wouldn't work... even more so.
Wouldn't work in a business either. Its just wrong and Geoff is trying to
feed me that BS.

Jon

Jon,

Well, get over it. He answered the question you asked. Then you told
him it wasn't the answer you wanted.

You asked if "Is there any command that essentially executes the code
and then echo's it?". include() does exactly that.

The fact is, you don't want to just execute and echo the code. Now you
tell us you want to modify results before it's output. That's a
different problem.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Apr 29 '07 #23

P: n/a
Well, get over it. He answered the question you asked. Then you told him
it wasn't the answer you wanted.
No, thats the point. he didn't answer it. He answered the question he
thought I asked and then when I said it wasn't Geoff has to jump in and give
me some BS.
You asked if "Is there any command that essentially executes the code and
then echo's it?". include() does exactly that.
yeah, and if thats all you read of my post then obviously your going to post
the wrong thing. Maybe its not clear because you fail to read the full post?

How bout reading the full post? Is that to much to ask?

"essentially I am trying to include php/html files in one another but I need
to do some parsing on them first. I'd rather not do something like"

If that isn't clear then I don't know what is.
The fact is, you don't want to just execute and echo the code. Now you
tell us you want to modify results before it's output. That's a different
problem.
I said that. I'm not going to bother wasting energy quoting my original post
but if you bother to actually look at it then you'll see thats exactly what
I said. It might not have been clear but it was obviously clearn enough for
Janwillem.
Apr 29 '07 #24

P: n/a
Message-ID: <FV*****************@newssvr27.news.prodigy.netfro m Jon
Slaughter contained the following:
>No, thats the point. he didn't answer it. He answered the question he
thought I asked and then when I said it wasn't Geoff has to jump in and give
me some BS.
Frankly I wish I'd made a much more critical comment. Then at least I'd
feel I deserved this outpouring of angst.

Still if it relieves your tension feel free to continue acting like an
arse.

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Apr 29 '07 #25

P: n/a
Jon Slaughter wrote:
>Well, get over it. He answered the question you asked. Then you told him
it wasn't the answer you wanted.

No, thats the point. he didn't answer it. He answered the question he
thought I asked and then when I said it wasn't Geoff has to jump in and give
me some BS.
If that wasn't the question you asked, then you are not clear with your
question. IME Geoff is pretty knowledgeable and accurate in his response.
>You asked if "Is there any command that essentially executes the code and
then echo's it?". include() does exactly that.

yeah, and if thats all you read of my post then obviously your going to post
the wrong thing. Maybe its not clear because you fail to read the full post?
Or maybe it's not clear because you don't explain thoroughly?
How bout reading the full post? Is that to much to ask?
I did. And I came to the same conclusion Geoff did.
"essentially I am trying to include php/html files in one another but I need
to do some parsing on them first. I'd rather not do something like"

If that isn't clear then I don't know what is.
That's perfectly clear. As clear as mud.
>The fact is, you don't want to just execute and echo the code. Now you
tell us you want to modify results before it's output. That's a different
problem.

I said that. I'm not going to bother wasting energy quoting my original post
but if you bother to actually look at it then you'll see thats exactly what
I said. It might not have been clear but it was obviously clearn enough for
Janwillem.

And I'm not going to bother wasting my energy trying to answer someone
who 1) doesn't make his question clear, and 2) attacks people trying to
help him.

Even if I got paid for this (I don't), I've put in too many years to put
up with your BS.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Apr 30 '07 #26

This discussion thread is closed

Replies have been disabled for this discussion.