<?php echo \"http://getUrl()\"; ?>
<?php $url = getUrl();echo \"http://\".$url; ?>
<?php echo \"http://\".getURL(); ?>
$query = \"SELECT title FROM go_pages \";$result = mysql_query($query);while ($row = mysql_fetch_array($result)) {echo \"<li><a href='/content/?p=$row[title]'>$row[title]</a></li>\";
<a href='_here_/content/ .......etc etc
\" . getUrl() . \"
echo \"<li><a href='/content/?p={$row[title]}'>{$row[title]}</a></li>\";
I need some help, Im trying to echo a function and It doesnt work, is it possible? If so how?
eg:
All it does is shows
http://getUrl() in the address bar
Thanks In advance
jonleesmith
Basically you are trying to echo a function call within a string, which is impossible as it is treating the function call like the string.
I'm not sure if the following also works but you could try
I want to put the getUrl() function in
Id really appreciate any other suggestions i did try
echo \"<li><a href='/content/?p={$row[title]}'>{$row[title]}</a></li>\";<?php
$myString = "Hello!";
echo $myString;
echo "<h5>I love using PHP!</h5>";
?>