NYCPHP Meetup

NYPHP.org

[nycphp-talk] include "<?php" in data

Michael Southwell southwell at dneba.com
Mon Nov 3 22:02:33 EST 2003


At 09:07 PM 11/3/2003, you wrote:
>On Mon, Nov 03, 2003 at 09:00:26PM -0500, Michael Southwell wrote:
>
> > $data="blah blah<br /><?php popbig('holster'); ?>";
>
>$data = 'blah blah<br /><' . "?php popbig('holster'); ?" . '>';

hmmm, thanks but this writes it out as data (not displayed because of the 
<> but in the source).  So it's there but it's not processed.  I fixed it 
by replacing the function call with the actual text of the function.  This 
seems a bit clumsy but at least it works.

A word of explanation:  I have some very similar pages which I'm converting 
to one page, with various display data in arrays and choosing which array 
by getting which one from the link to it.  Sometimes there is a chance to 
view a larger picture of the product.  So it's that link that I'm trying to 
get in here and there.  This means I'll need to repeat the language of the 
function every time it's needed, but still this is cleaner than a lot of 
different pages.  Or is there another way to do this?  (I think I hear 
somebody whispering "you need object orientation.")


Michael G. Southwell =================================
DNEBA Enterprises
81 South Road
Bloomingdale, NJ 07403-1419
973/492-7873 (voice and fax)
southwell at dneba.com
http://www.dneba.com
======================================================




More information about the talk mailing list