Jump to content

[SOLVED] unexpected T_STRING Function included


Recommended Posts

I have created a simple anchor function that im using. and the function works.

 

<?php
//Anchor Function
function anchor ($link, $text='')
{
return '<a href="' . $link . '">' . $text . '</a>';
}
?>

 

but when i use it i get this error

 

Parse error:  parse error, unexpected T_STRING in login.php on line 24

 

heres where i use it

 

<?php
    echo '<p>' . anchor ('index.php?action=forgot', Forgot Password) . ' | ' . anchor ('index.php?action=register', Register) . '</p>';
?>

 

and im not sure whats wrong i have looked and looked but with no luck

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.