Reputation: 5770
Current URL is
<?php include ("/home/domain/public_html/create/dogs.php"); ?>
I want to do this:
<?php include ("/home/domain/public_html/create/<?php $partURL; ?>s.php"); ?>
$partURL is predefined. Just need to parse the php include within the above URL to parse correctly
Upvotes: 2
Views: 111
Reputation: 1962
You have to remove the PHP Tags from the "part URL" cause you are already in PHP.
<?php include ("/home/domain/public_html/create/" . $partURL . "s.php"); ?>
Upvotes: 1
Reputation: 9299
Read up on strings in PHP.
<?php include ("/home/domain/public_html/create/".$partURL."s.php"); ?>
Upvotes: 1
Reputation: 789
You can do like this
<?php include ("/home/domain/public_html/create/{$partURL}s.php"); ?>
You can not use php tag with in a php tag like <?php <?php ?>?>
Upvotes: 2