PHP echo when already inside a PHP include

pda4me
pda4me used Ask the Experts™
on
How do I format this properly?  I think the echo statement snips are blowing this up.  How do I fix?

<?php include'http://maps.google.com/maps?f=d&source=s_d&saddr=Fort+Myers,+6325+Presidential+Court,+FL&daddr=<?php echo($row_WADAsys_clients['address']); ?>+<?php echo($row_WADAsys_clients['city']); ?>+<?php echo($row_WADAsys_clients['state']); ?>+<?php echo($row_WADAsys_clients['zip']); ?>&hl=en&ie=UTF8&layer=c&pw=2'?>

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Try:
<?php include'http://maps.google.com/maps?f=d&source=s_d&saddr=Fort+Myers,+6325+Presidential+Court,+FL&daddr='.($row_WADAsys_clients['address']).'+'.($row_WADAsys_clients['city']).'+'.($row_WADAsys_clients['state']).'+'.($row_WADAsys_clients['zip']).'&hl=en&ie=UTF8&layer=c&pw=2'; ?>

Open in new window

Author

Commented:
Close...basically I want to display this google directions page while inserting my values for the address within my php page...how do I do this?
F IgorDeveloper
Commented:
If you "include" some external page all the references inside are lost

Maybe you may need to add an "iframe" pointing to the external resource

<?php

$url="http://maps.google.com/maps?f=d&source=s_d&saddr=Fort+Myers,+6325+Presidential+Court,+FL&daddr={$row_WADAsys_clients['address']}+{$row_WADAsys_clients['city']}+{$row_WADAsys_clients['state']}+{$row_WADAsys_clients['zip']}&hl=en&ie=UTF8&layer=c&pw=2";

// an iframe with the map content
echo "<IFRAME src='$url' style='width:400px;height:500px' ></IFRAME>";

?>

Author

Commented:
That would be idea but I need the ability to not set the height to a fixed value...

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial