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

php outside php (?)

P: n/a
Sounds weird, i know.
What i want/wonder is the following:

PHP can do the next:

<?php

if($foo == 'bar')
{

?>
Ow yeah, foo is bar!
<?php

};

?>

But how can i do the following:

<?php

$foo=

?>
this is what foo looks like.
<?php

};

?>

This way i could edit the content of $foo in DW's design-view.
I hope it's clear enough for you all to understand...

Greetings frizzle.

Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
frizzle wrote:
But how can i do the following:

<?php

$foo=

?>
this is what foo looks like.
<?php

};

?>

This way i could edit the content of $foo in DW's design-view.
I hope it's clear enough for you all to understand...


<?php
ob_start();
?>
this is what foo looks like.
<?php
$foo=ob_get_clean();
?>
--
Justin Koivisto - ju****@koivi.com
http://koivi.com
Jul 17 '05 #2

P: n/a
Wow, little late on the reply,
but i still wanted to thank you for your help.

This is exactly what i meant, and it works great! :D

Thanks again.

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.